mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
mailbox: bcm-pdc: potential NULL dereference in pdc_shutdown()
We can't pass NULL pointers to pdc_ring_free() so I moved the check for NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
e0c6fba45a
commit
068cf29eca
1 changed files with 4 additions and 3 deletions
|
|
@ -1191,10 +1191,11 @@ static void pdc_shutdown(struct mbox_chan *chan)
|
|||
{
|
||||
struct pdc_state *pdcs = chan->con_priv;
|
||||
|
||||
if (pdcs)
|
||||
dev_dbg(&pdcs->pdev->dev,
|
||||
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
|
||||
if (!pdcs)
|
||||
return;
|
||||
|
||||
dev_dbg(&pdcs->pdev->dev,
|
||||
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
|
||||
pdc_ring_free(pdcs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue