From: Haibo Chen Date: Tue, 8 Aug 2017 10:54:01 +0000 (+0800) Subject: mmc: mmc: correct the logic for setting HS400ES signal voltage X-Git-Tag: v4.9.44~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a205d8145c22d83e24ada019b599a33f7bf68ed;p=platform%2Fkernel%2Flinux-amlogic.git mmc: mmc: correct the logic for setting HS400ES signal voltage commit 92ddd95919466de5d34f3cb43635da9a7f9ab814 upstream. Change the default err value to -EINVAL, make sure the card only has type EXT_CSD_CARD_TYPE_HS400_1_8V also do the signal voltage setting when select hs400es mode. Fixes: commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode") Signed-off-by: Haibo Chen Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 323dba3..b2ca10c 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1258,7 +1258,7 @@ out_err: static int mmc_select_hs400es(struct mmc_card *card) { struct mmc_host *host = card->host; - int err = 0; + int err = -EINVAL; u8 val; if (!(host->caps & MMC_CAP_8_BIT_DATA)) {