diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-20 07:32:18 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-23 07:04:13 -0400 |
commit | 043c998f95036e7fc796b240ab5ba49a8de36df3 (patch) | |
tree | ef8db8c9bb930c5ad431bf815482fc9d82048e39 | |
parent | f8c1700dd7d2ce9b2238b20d364317b2968ac76b (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>
-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 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, | |||
1288 | 1288 | ||
1289 | if (id == NULL) { | 1289 | if (id == NULL) { |
1290 | pr_err("get() with no identifier\n"); | 1290 | pr_err("get() with no identifier\n"); |
1291 | return regulator; | 1291 | return ERR_PTR(-EINVAL); |
1292 | } | 1292 | } |
1293 | 1293 | ||
1294 | if (dev) | 1294 | if (dev) |