Commit 043c998f authored by Mark Brown's avatar Mark Brown

regulator: core: Fix return code for invalid parameters

We should be returning an error, a repeated call will never succeed.
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent f8c1700d
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment