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>
This commit is contained in:
Can Guo 2017-07-27 10:15:49 +08:00 committed by Gerrit - the friendly Code Review server
parent d727a95d2e
commit aaf56cab21

View file

@ -1286,6 +1286,7 @@ static int _mmc_sd_resume(struct mmc_host *host)
if (err) { if (err) {
pr_err("%s: %s: mmc_sd_init_card_failed (%d)\n", pr_err("%s: %s: mmc_sd_init_card_failed (%d)\n",
mmc_hostname(host), __func__, err); mmc_hostname(host), __func__, err);
mmc_power_off(host);
goto out; goto out;
} }
mmc_card_clr_suspended(host->card); mmc_card_clr_suspended(host->card);