From: Sachin Kamat Date: Tue, 25 Feb 2014 09:48:28 +0000 (+0530) Subject: mmc: dw_mmc: Fix NULL pointer dereference X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17c8bc85f27227e073ed8e59da39ff32f1bee873;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Sachin Kamat Acked-by: Seungwon Jeon Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 55cd110a49c4..0c56faa6730e 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -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;