summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Viswanath <vviswana@codeaurora.org>2017-03-22 15:04:24 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-09 22:55:03 -0700
commitddd73093288e41fb166cec3ddeee9a095e64fb96 (patch)
treee2b43063a1df51cdf0c204ec73a458d8dfd5e244
parent272879fc1fb285de38f48780364fcd7e0d43ea20 (diff)
mmc: sd: return error information of sd_init_card incase of failure
During _mmc_sd_resume, if sd card initialization fails, the error information is getting overwritten by mmc_resume_clk_scaling and the error is not passed to caller function. Change-Id: Id173e2db65024f12a714ec623668e47c540a56c3 Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
-rw-r--r--drivers/mmc/core/sd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 5b4d5d74fe55..5033107f6e26 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1283,6 +1283,11 @@ static int _mmc_sd_resume(struct mmc_host *host)
#else
err = mmc_sd_init_card(host, host->card->ocr, host->card);
#endif
+ if (err) {
+ pr_err("%s: %s: mmc_sd_init_card_failed (%d)\n",
+ mmc_hostname(host), __func__, err);
+ goto out;
+ }
mmc_card_clr_suspended(host->card);
if (host->card->sdr104_blocked)