OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acfa77b
)
mmc: sdhci-of-esdhc: Handle error from mmc_of_parse()
author
Ulf Hansson
<ulf.hansson@linaro.org>
Thu, 18 Dec 2014 09:41:41 +0000
(10:41 +0100)
committer
Ulf Hansson
<ulf.hansson@linaro.org>
Mon, 19 Jan 2015 08:56:13 +0000
(09:56 +0100)
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>
drivers/mmc/host/sdhci-of-esdhc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/sdhci-of-esdhc.c
b/drivers/mmc/host/sdhci-of-esdhc.c
index
4a654d4
..
17fe02e
100644
(file)
--- 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)
}
/* 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;
}