|
@@ -2259,7 +2259,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
|
|
/*if there are external regulators, get them*/
|
|
/*if there are external regulators, get them*/
|
|
ret = mmc_regulator_get_supply(mmc);
|
|
ret = mmc_regulator_get_supply(mmc);
|
|
if (ret == -EPROBE_DEFER)
|
|
if (ret == -EPROBE_DEFER)
|
|
- goto err_setup_bus;
|
|
|
|
|
|
+ goto err_host_allocated;
|
|
|
|
|
|
if (!mmc->ocr_avail)
|
|
if (!mmc->ocr_avail)
|
|
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
|
|
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)
|
|
if (host->pdata->caps2)
|
|
mmc->caps2 = 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) {
|
|
if (host->pdata->blk_settings) {
|
|
mmc->max_segs = host->pdata->blk_settings->max_segs;
|
|
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);
|
|
ret = mmc_add_host(mmc);
|
|
if (ret)
|
|
if (ret)
|
|
- goto err_setup_bus;
|
|
|
|
|
|
+ goto err_host_allocated;
|
|
|
|
|
|
#if defined(CONFIG_DEBUG_FS)
|
|
#if defined(CONFIG_DEBUG_FS)
|
|
dw_mci_init_debugfs(slot);
|
|
dw_mci_init_debugfs(slot);
|
|
@@ -2326,7 +2328,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
-err_setup_bus:
|
|
|
|
|
|
+err_host_allocated:
|
|
mmc_free_host(mmc);
|
|
mmc_free_host(mmc);
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|