From: Jaehoon Chung Date: Fri, 9 Mar 2018 06:10:21 +0000 (+0900) Subject: mmc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433 X-Git-Tag: v5.15~9227^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e22842dd64bf86753d3f2b6ea474d73fc1e6ca24;p=platform%2Fkernel%2Flinux-starfive.git mmc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433 Before enabling the clock, dwmmc exynos driver is trying to access the register. Then the kernel panic can be occurred. Signed-off-by: Jaehoon Chung Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index fa41d94..a84aa3f 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -165,9 +165,15 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing) static int dw_mci_exynos_runtime_resume(struct device *dev) { struct dw_mci *host = dev_get_drvdata(dev); + int ret; + + ret = dw_mci_runtime_resume(dev); + if (ret) + return ret; dw_mci_exynos_config_smu(host); - return dw_mci_runtime_resume(dev); + + return ret; } /**