summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCan Guo <cang@codeaurora.org>2017-07-27 10:15:49 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-09-05 02:27:28 -0700
commitaaf56cab213722413b85ad50ffa4d6ae842c4e50 (patch)
treeda60a9c611c6aa931962eed9e46138e70874dcf9
parentd727a95d2e023f5557e893aaf50a75d144f4a71e (diff)
mmc: core: power off host if SD card resume fails
Current SD card resume function does not handle card init failure but only prints resume error message. This change powers off mmc host before exit resume if card init fails. Change-Id: Idc27d8ed8769b92373bb9770f5e706b18e76404d Signed-off-by: Can Guo <cang@codeaurora.org>
-rw-r--r--drivers/mmc/core/sd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 5033107f6e26..9bef77ba29fd 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1286,6 +1286,7 @@ static int _mmc_sd_resume(struct mmc_host *host)
if (err) {
pr_err("%s: %s: mmc_sd_init_card_failed (%d)\n",
mmc_hostname(host), __func__, err);
+ mmc_power_off(host);
goto out;
}
mmc_card_clr_suspended(host->card);