You need to sign in or sign up before continuing.
提交 068cf29e 编写于 作者: D Dan Carpenter 提交者: Jassi Brar

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 e0c6fba4
...@@ -1191,10 +1191,11 @@ static void pdc_shutdown(struct mbox_chan *chan) ...@@ -1191,10 +1191,11 @@ static void pdc_shutdown(struct mbox_chan *chan)
{ {
struct pdc_state *pdcs = chan->con_priv; struct pdc_state *pdcs = chan->con_priv;
if (pdcs) if (!pdcs)
dev_dbg(&pdcs->pdev->dev, return;
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
dev_dbg(&pdcs->pdev->dev,
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
pdc_ring_free(pdcs); pdc_ring_free(pdcs);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册