aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorUlf Hansson2014-12-18 10:41:43 +0100
committerUlf Hansson2015-01-19 09:56:14 +0100
commitfc702cb35dcb660eefb27e9dc1fe93aed9f39f64 (patch)
treeaa05bbce61186c9f5a171711b7613761633b9b3b /drivers
parentf8e3260c136b5d092ba86a78277b9a4579d8480a (diff)
mmc: sdhci-st: Do cleanup while mmc_of_parse() return an error
At errors, balance sdhci_pltfm_init() with sdhci_pltfm_free(), to make sure all data is freed properly. Cc: Srinivas Kandagatla <srinivas.kandagatla@gmail.com> Cc: Maxime Coquelin <maxime.coquelin@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
index 328f348c7243..882b07e9667e 100644
--- a/drivers/mmc/host/sdhci-st.c
+++ b/drivers/mmc/host/sdhci-st.c
@@ -78,10 +78,9 @@ static int sdhci_st_probe(struct platform_device *pdev)
}
ret = mmc_of_parse(host->mmc);
-
if (ret) {
dev_err(&pdev->dev, "Failed mmc_of_parse\n");
- return ret;
+ goto err_of;
}
clk_prepare_enable(clk);
@@ -108,6 +107,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
err_out:
clk_disable_unprepare(clk);
+err_of:
sdhci_pltfm_free(pdev);
return ret;