projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0c6fba
)
mailbox: bcm-pdc: potential NULL dereference in pdc_shutdown()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 4 Aug 2016 05:30:31 +0000
(08:30 +0300)
committer
Jassi Brar
<jaswinder.singh@linaro.org>
Mon, 29 Aug 2016 13:11:15 +0000
(18:41 +0530)
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>
drivers/mailbox/bcm-pdc-mailbox.c
patch
|
blob
|
history
diff --git
a/drivers/mailbox/bcm-pdc-mailbox.c
b/drivers/mailbox/bcm-pdc-mailbox.c
index
cbe0c1e
..
c56d4d0
100644
(file)
--- a/
drivers/mailbox/bcm-pdc-mailbox.c
+++ b/
drivers/mailbox/bcm-pdc-mailbox.c
@@
-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);
}