Message ID | 20140225013424.GL25940@sirena.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Feb 24, 2014 at 10:34 PM, Mark Brown <broonie@kernel.org> wrote: > On Mon, Feb 24, 2014 at 09:50:58PM +0100, Markus Pargmann wrote: > >> The only situation where this returns -EINVAL is a dummy regulator that >> is not always_on. As it doesn't make sense to have a dummy regulator >> that is not always_on, I will add a check for exactly this situation to >> the regulator_register function and drop the "return -EINVAL" above. > > I've squashed the following fix in today: Thanks. This fixes the issue.
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 8cbc7d7..9a09f3c 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1017,7 +1017,7 @@ static int set_machine_constraints(struct regulator_dev *rdev, */ if (rdev->constraints->always_on || rdev->constraints->boot_on) { ret = _regulator_do_enable(rdev); - if (ret < 0) { + if (ret < 0 && ret != -EINVAL) { rdev_err(rdev, "failed to enable\n"); goto out; }