aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-25 04:48:28 -0500
committerChris Ball <chris@printf.net>2014-02-25 15:43:27 -0500
commit17c8bc85f27227e073ed8e59da39ff32f1bee873 (patch)
tree44445e683c5021e806fa9c4b68fb07e26a2f4d41 /drivers/mmc
parent550459eeb21b8f3553283d506fdcb92c9147c1eb (diff)
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 <sachin.kamat@linaro.org> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c2
1 files changed, 1 insertions, 1 deletions
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)
1345 1345
1346 if (!err) { 1346 if (!err) {
1347 if (!data->stop || mrq->sbc) { 1347 if (!data->stop || mrq->sbc) {
1348 if (mrq->sbc) 1348 if (mrq->sbc && data->stop)
1349 data->stop->error = 0; 1349 data->stop->error = 0;
1350 dw_mci_request_end(host, mrq); 1350 dw_mci_request_end(host, mrq);
1351 goto unlock; 1351 goto unlock;