diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-12-17 19:24:57 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-18 02:59:15 +0400 |
commit | 0781719bd6614e60dd5fff1b5cd45dbce2f7dd2d (patch) | |
tree | cbf44886b6344057f27e7142e912a9a542ed9fa7 /drivers/regulator/core.c | |
parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
download | linux-0781719bd6614e60dd5fff1b5cd45dbce2f7dd2d.tar.xz |
regulator: core: don't print an error when no regulator is found
Only print an error when _regulator_get() is expected to return a valid
regulator, that is when _regulator_get() is called from regulator_get() and
we're not using the dummy because we don't have full-constraints, or when
_regulator_get() is called from regulator_get_exclusive() in which case
returning a dummy is not allowed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d85f31385b24..9888f26aa131 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1351,7 +1351,8 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, rdev = dummy_regulator_rdev; goto found; - } else { + /* Don't log an error when called from regulator_get_optional() */ + } else if (!have_full_constraints() || exclusive) { dev_err(dev, "dummy supplies not allowed\n"); } |