Revert "power: regulator: Return success on attempt to disable an always-on regulator"

This reverts commit e17e0ceb83.

It is advised to return an error when trying to disable an always-on
regulator and let the consumer driver handle the error if needed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
This commit is contained in:
Lokesh Vutla 2019-01-11 15:15:50 +05:30 committed by Simon Glass
parent 91b3a1866b
commit f93fab3126

View file

@ -113,7 +113,7 @@ int regulator_set_enable(struct udevice *dev, bool enable)
uc_pdata = dev_get_uclass_platdata(dev);
if (!enable && uc_pdata->always_on)
return 0;
return -EACCES;
return ops->set_enable(dev, enable);
}