summaryrefslogtreecommitdiff
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2014-08-25 22:19:04 +0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 15:59:19 +0400
commit3cf890fc42b2d3bd5a3a7e4c1f61b0637efbe2ec (patch)
tree8ccb87f65e50a85f71bb76aeefae464396406615 /drivers/mmc/host
parent1ba4c322caaecfb68c1e175599398caef946a525 (diff)
downloadlinux-3cf890fc42b2d3bd5a3a7e4c1f61b0637efbe2ec.tar.xz
mmc: dw_mmc: Pass back errors from mmc_of_parse()
It's possible that mmc_of_parse() could return errors (possibly in some future version it might return -EPROBE_DEFER even). Let's pass those errors back. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/dw_mmc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 23719249182b..835e913cafb7 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2259,7 +2259,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
/*if there are external regulators, get them*/
ret = mmc_regulator_get_supply(mmc);
if (ret == -EPROBE_DEFER)
- goto err_setup_bus;
+ goto err_host_allocated;
if (!mmc->ocr_avail)
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
@@ -2283,7 +2283,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
if (host->pdata->caps2)
mmc->caps2 = host->pdata->caps2;
- mmc_of_parse(mmc);
+ ret = mmc_of_parse(mmc);
+ if (ret)
+ goto err_host_allocated;
if (host->pdata->blk_settings) {
mmc->max_segs = host->pdata->blk_settings->max_segs;
@@ -2315,7 +2317,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
ret = mmc_add_host(mmc);
if (ret)
- goto err_setup_bus;
+ goto err_host_allocated;
#if defined(CONFIG_DEBUG_FS)
dw_mci_init_debugfs(slot);
@@ -2326,7 +2328,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
return 0;
-err_setup_bus:
+err_host_allocated:
mmc_free_host(mmc);
return ret;
}