1
0
Fork 0

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>
hifive-unleashed-5.1
Ulf Hansson 2014-12-18 10:41:43 +01:00
parent f8e3260c13
commit fc702cb35d
1 changed files with 2 additions and 2 deletions

View File

@ -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;