diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-11-19 08:16:59 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-11-26 08:31:04 -0500 |
commit | e34d467c515f5f64e12c28fb2b15035c9b38f332 (patch) | |
tree | bdecd62c98f23af780307c88c8ede3c97b7d2462 /drivers/mmc | |
parent | 5654d90064bda87a9738fd6fcfcfca5537754259 (diff) |
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: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mxs-mmc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index f2c49e0e213d..60c4ca97a727 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c | |||
@@ -619,7 +619,9 @@ static int mxs_mmc_probe(struct platform_device *pdev) | |||
619 | ret = PTR_ERR(ssp->clk); | 619 | ret = PTR_ERR(ssp->clk); |
620 | goto out_mmc_free; | 620 | goto out_mmc_free; |
621 | } | 621 | } |
622 | clk_prepare_enable(ssp->clk); | 622 | ret = clk_prepare_enable(ssp->clk); |
623 | if (ret) | ||
624 | goto out_mmc_free; | ||
623 | 625 | ||
624 | ret = mxs_mmc_reset(host); | 626 | ret = mxs_mmc_reset(host); |
625 | if (ret) { | 627 | if (ret) { |
@@ -719,8 +721,7 @@ static int mxs_mmc_resume(struct device *dev) | |||
719 | struct mxs_mmc_host *host = mmc_priv(mmc); | 721 | struct mxs_mmc_host *host = mmc_priv(mmc); |
720 | struct mxs_ssp *ssp = &host->ssp; | 722 | struct mxs_ssp *ssp = &host->ssp; |
721 | 723 | ||
722 | clk_prepare_enable(ssp->clk); | 724 | return clk_prepare_enable(ssp->clk); |
723 | return 0; | ||
724 | } | 725 | } |
725 | #endif | 726 | #endif |
726 | 727 | ||