aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-12-18 04:41:41 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-01-19 03:56:13 -0500
commitf0991408aef9efaedff51e58616b15ecab428135 (patch)
treeefbef1ee4edc225800039be7bee8172c620809b2
parentacfa77b1a95c6179b29445d7142d94722948d8e1 (diff)
mmc: sdhci-of-esdhc: Handle error from mmc_of_parse()
Since mmc_of_parse() may fail, let's deal with it and thus do proper error handling. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sdhci-of-esdhc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 4a654d4ec8db..17fe02ed6672 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -370,13 +370,19 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
370 } 370 }
371 371
372 /* call to generic mmc_of_parse to support additional capabilities */ 372 /* call to generic mmc_of_parse to support additional capabilities */
373 mmc_of_parse(host->mmc); 373 ret = mmc_of_parse(host->mmc);
374 if (ret)
375 goto err;
376
374 mmc_of_parse_voltage(np, &host->ocr_mask); 377 mmc_of_parse_voltage(np, &host->ocr_mask);
375 378
376 ret = sdhci_add_host(host); 379 ret = sdhci_add_host(host);
377 if (ret) 380 if (ret)
378 sdhci_pltfm_free(pdev); 381 goto err;
379 382
383 return 0;
384 err:
385 sdhci_pltfm_free(pdev);
380 return ret; 386 return ret;
381} 387}
382 388