From: Shawn Lin Date: Fri, 22 Jan 2016 07:43:12 +0000 (+0800) Subject: mmc: dw_mmc: fix err handle of dw_mci_probe X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=3744415cc4bc732dde6491295ec628a7e3b33754;p=deliverable%2Flinux.git mmc: dw_mmc: fix err handle of dw_mci_probe This patch add correct err handle if dw_mci_ctrl_reset failed while probing. Signed-off-by: Shawn Lin Signed-off-by: Jaehoon Chung Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 8cb8c1c8b3dd..341e0f082f08 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -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);