提交 043c998f 编写于 作者: M 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: NMark Brown <broonie@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册