1
0
Fork 0

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>
hifive-unleashed-5.1
Mark Brown 2013-09-20 12:32:18 +01:00
parent f8c1700dd7
commit 043c998f95
1 changed files with 1 additions and 1 deletions

View File

@ -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)