diff options
author | 2013-09-20 12:23:30 +0100 | |
---|---|---|
committer | 2013-09-20 17:38:44 +0100 | |
commit | 9b92da1f1205bd2591487051a93624dd6c258eef (patch) | |
tree | 467b882973ed4ad12cbdbb89f7f17a47dc9612c0 /drivers/regulator/core.c | |
parent | regulator: core: Remove unused regulator_use_dummy_regulator() (diff) | |
download | linux-9b92da1f1205bd2591487051a93624dd6c258eef.tar.gz linux-9b92da1f1205bd2591487051a93624dd6c258eef.tar.bz2 linux-9b92da1f1205bd2591487051a93624dd6c258eef.zip |
regulator: core: Fix default return value for _get()
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>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ac3a864d3635..088b41ac9506 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -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"); |