From ddd73093288e41fb166cec3ddeee9a095e64fb96 Mon Sep 17 00:00:00 2001 From: Vijay Viswanath Date: Wed, 22 Mar 2017 15:04:24 +0530 Subject: 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 --- drivers/mmc/core/sd.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3