]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: dw_mmc: exynos: fix the suspend/resume issue for exynos5433
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 9 Mar 2018 06:10:21 +0000 (15:10 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 15 Mar 2018 09:34:30 +0000 (10:34 +0100)
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 <jh80.chung@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc-exynos.c

index fa41d9422d57e04e9b12ef097a74d52418bdd87b..a84aa3f1ae8547c4cdbf24cb05ef7e32dca8d94a 100644 (file)
@@ -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;
 }
 
 /**