Skip to content

Commit

Permalink
regulator: core: don't print an error when no regulator is found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Mark Brown committed Dec 17, 2013
1 parent 319e2e3 commit 0781719
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit 0781719

Please sign in to comment.