mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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>
This commit is contained in:
parent
acfa77b1a9
commit
f0991408ae
1 changed files with 8 additions and 2 deletions
|
@ -370,13 +370,19 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* call to generic mmc_of_parse to support additional capabilities */
|
||||
mmc_of_parse(host->mmc);
|
||||
ret = mmc_of_parse(host->mmc);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
mmc_of_parse_voltage(np, &host->ocr_mask);
|
||||
|
||||
ret = sdhci_add_host(host);
|
||||
if (ret)
|
||||
sdhci_pltfm_free(pdev);
|
||||
goto err;
|
||||
|
||||
return 0;
|
||||
err:
|
||||
sdhci_pltfm_free(pdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue