From: Simon Glass Date: Fri, 3 Jul 2015 00:16:06 +0000 (-0600) Subject: dm: power: Don't return an error when regulators are not autoset X-Git-Tag: v2015.10-rc2~394^2~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d08504d18a0a6af2ba6171a4a3e71a032d2836b6;p=u-boot dm: power: Don't return an error when regulators are not autoset Not all regulators can be set up automatically. Adjust the code so that regulators_enable_boot_on() will return success when some are skipped. Only genuine errors are reported. Signed-off-by: Simon Glass Acked-by: Przemyslaw Marczak --- diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 12e141b4ad..f3fe7a55e1 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -319,8 +319,10 @@ int regulators_enable_boot_on(bool verbose) dev && !ret; uclass_next_device(&dev)) { ret = regulator_autoset(dev); - if (ret == -EMEDIUMTYPE) + if (ret == -EMEDIUMTYPE) { + ret = 0; continue; + } if (verbose) regulator_show(dev, ret); }