Skip to content

Commit

Permalink
regulator: core: Fix default return value for _get()
Browse files Browse the repository at this point in the history
Now that we are defaulting to providing dummy regulators fix the logic
for substituting a dummy by making the default return code -EPROBE_DEFER.

Reported-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Sep 20, 2013
1 parent 4f0ac6d commit 9b92da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
struct regulator_dev *rdev;
struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
const char *devname = NULL;
int ret = 0;
int ret = -EPROBE_DEFER;

if (id == NULL) {
pr_err("get() with no identifier\n");
Expand Down

0 comments on commit 9b92da1

Please sign in to comment.