aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorGravatar Mark Brown <broonie@linaro.org> 2013-09-20 12:32:18 +0100
committerGravatar Mark Brown <broonie@linaro.org> 2013-09-23 12:04:13 +0100
commit043c998f95036e7fc796b240ab5ba49a8de36df3 (patch)
treeef8db8c9bb930c5ad431bf815482fc9d82048e39 /drivers/regulator/core.c
parentregulator: core: set current constraints while setting machine constraints (diff)
downloadlinux-043c998f95036e7fc796b240ab5ba49a8de36df3.tar.gz
linux-043c998f95036e7fc796b240ab5ba49a8de36df3.tar.bz2
linux-043c998f95036e7fc796b240ab5ba49a8de36df3.zip
regulator: core: Fix return code for invalid parameters
We should be returning an error, a repeated call will never succeed. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 66ae12d12c10..ad154247bb90 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1288,7 +1288,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
if (id == NULL) {
pr_err("get() with no identifier\n");
- return regulator;
+ return ERR_PTR(-EINVAL);
}
if (dev)