Skip to content

Commit

Permalink
mmc: sunxi: Return error on mmc_regulator_set_ocr() fail in .set_ios op
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chen-Yu Tsai authored and Ulf Hansson committed Feb 29, 2016
1 parent 0314cbd commit 4159215
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mmc/host/sunxi-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4159215

Please sign in to comment.