提交 17c8bc85 编写于 作者: S Sachin Kamat 提交者: Chris Ball

mmc: dw_mmc: Fix NULL pointer dereference

If mrq->sbc is not NULL but data->stop happens to be NULL,
it will lead to NULL pointer dereferencing. Avoid this by
having a NULL check for data->stop.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NSeungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: NChris Ball <chris@printf.net>
上级 550459ee
......@@ -1345,7 +1345,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
if (!err) {
if (!data->stop || mrq->sbc) {
if (mrq->sbc)
if (mrq->sbc && data->stop)
data->stop->error = 0;
dw_mci_request_end(host, mrq);
goto unlock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册