From: Chen-Yu Tsai Date: Thu, 21 Jan 2016 05:26:29 +0000 (+0800) Subject: mmc: sunxi: Return error on mmc_regulator_set_ocr() fail in .set_ios op X-Git-Tag: v4.9.8~2443^2~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4159215ac9aa020c0815141f1916b33dc226fb42;p=platform%2Fkernel%2Flinux-rpi3.git mmc: sunxi: Return error on mmc_regulator_set_ocr() fail in .set_ios op Let .set_ios() fail if mmc_regulator_set_ocr() fails to enable and set a proper voltage for vmmc. Signed-off-by: Chen-Yu Tsai Acked-by: Hans de Goede Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index cce5ca5..790f016 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -711,7 +711,10 @@ static void sunxi_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) break; case MMC_POWER_UP: - mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); + host->ferror = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, + ios->vdd); + if (host->ferror) + return; host->ferror = sunxi_mmc_init_host(mmc); if (host->ferror)