Commit e34d467c authored by Fabio Estevam's avatar Fabio Estevam Committed by Ulf Hansson

mmc: mxs-mmc: Check for clk_prepare_enable() error

clk_prepare_enable() may fail and in this case we should propagate the error.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5654d900
...@@ -619,7 +619,9 @@ static int mxs_mmc_probe(struct platform_device *pdev) ...@@ -619,7 +619,9 @@ static int mxs_mmc_probe(struct platform_device *pdev)
ret = PTR_ERR(ssp->clk); ret = PTR_ERR(ssp->clk);
goto out_mmc_free; goto out_mmc_free;
} }
clk_prepare_enable(ssp->clk); ret = clk_prepare_enable(ssp->clk);
if (ret)
goto out_mmc_free;
ret = mxs_mmc_reset(host); ret = mxs_mmc_reset(host);
if (ret) { if (ret) {
...@@ -719,8 +721,7 @@ static int mxs_mmc_resume(struct device *dev) ...@@ -719,8 +721,7 @@ static int mxs_mmc_resume(struct device *dev)
struct mxs_mmc_host *host = mmc_priv(mmc); struct mxs_mmc_host *host = mmc_priv(mmc);
struct mxs_ssp *ssp = &host->ssp; struct mxs_ssp *ssp = &host->ssp;
clk_prepare_enable(ssp->clk); return clk_prepare_enable(ssp->clk);
return 0;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment