summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-20 12:32:18 +0100
committerMark Brown <broonie@linaro.org>2013-09-23 12:04:13 +0100
commit043c998f95036e7fc796b240ab5ba49a8de36df3 (patch)
treeef8db8c9bb930c5ad431bf815482fc9d82048e39 /drivers/regulator
parentf8c1700dd7d2ce9b2238b20d364317b2968ac76b (diff)
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')
-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 66ae12d12c1..ad154247bb9 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)