summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc-exynos.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-06-20 13:16:09 +0900
committerUlf Hansson <ulf.hansson@linaro.org>2016-07-25 10:34:29 +0200
commite5a613537c4816830541046af12e8d37b075949c (patch)
tree5d2de2c878e9dad5dbd59c0022359f2bbbed082d /drivers/mmc/host/dw_mmc-exynos.c
parent65257a0deed5aee66b4e3708944f0be62a64cabc (diff)
downloadlinux-stable-e5a613537c4816830541046af12e8d37b075949c.tar.gz
linux-stable-e5a613537c4816830541046af12e8d37b075949c.tar.bz2
linux-stable-e5a613537c4816830541046af12e8d37b075949c.zip
mmc: dw_mmc: exynos: fix the NULL pointer dereference error
"host->cur_slot" should be assigned to start the request. So it can be the NULL pointer. This patch fixed this error. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-exynos.c')
-rw-r--r--drivers/mmc/host/dw_mmc-exynos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 7e3a3247b852..da0ef1765735 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -157,7 +157,7 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
* HOLD register should be bypassed in case there is no phase shift
* applied on CMD/DATA that is sent to the card.
*/
- if (!SDMMC_CLKSEL_GET_DRV_WD3(clksel))
+ if (!SDMMC_CLKSEL_GET_DRV_WD3(clksel) && host->cur_slot)
set_bit(DW_MMC_CARD_NO_USE_HOLD, &host->cur_slot->flags);
}