diff options
author | 2013-09-20 12:32:18 +0100 | |
---|---|---|
committer | 2013-09-23 12:04:13 +0100 | |
commit | 043c998f95036e7fc796b240ab5ba49a8de36df3 (patch) | |
tree | ef8db8c9bb930c5ad431bf815482fc9d82048e39 /drivers/regulator/core.c | |
parent | regulator: core: set current constraints while setting machine constraints (diff) | |
download | linux-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.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, if (id == NULL) { pr_err("get() with no identifier\n"); - return regulator; + return ERR_PTR(-EINVAL); } if (dev) |