mmc: dw_mmc: fix err handle of dw_mci_probe
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 22 Jan 2016 07:43:12 +0000 (15:43 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 29 Feb 2016 10:03:10 +0000 (11:03 +0100)
This patch add correct err handle if dw_mci_ctrl_reset
failed while probing.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c

index 8cb8c1c..341e0f0 100644 (file)
@@ -3063,8 +3063,10 @@ int dw_mci_probe(struct dw_mci *host)
        }
 
        /* Reset all blocks */
-       if (!dw_mci_ctrl_reset(host, SDMMC_CTRL_ALL_RESET_FLAGS))
-               return -ENODEV;
+       if (!dw_mci_ctrl_reset(host, SDMMC_CTRL_ALL_RESET_FLAGS)) {
+               ret = -ENODEV;
+               goto err_clk_ciu;
+       }
 
        host->dma_ops = host->pdata->dma_ops;
        dw_mci_init_dma(host);