Commit 4159215a authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Ulf Hansson

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: default avatarChen-Yu Tsai <wens@csie.org>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 0314cbd4
...@@ -711,7 +711,10 @@ static void sunxi_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -711,7 +711,10 @@ static void sunxi_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
break; break;
case MMC_POWER_UP: 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); host->ferror = sunxi_mmc_init_host(mmc);
if (host->ferror) if (host->ferror)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment