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 <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Chen-Yu Tsai 2016-01-21 13:26:29 +08:00 committed by Ulf Hansson
parent 0314cbd438
commit 4159215ac9
1 changed files with 4 additions and 1 deletions

View File

@ -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)