From: Mark Brown Date: Fri, 20 Sep 2013 11:32:18 +0000 (+0100) Subject: regulator: core: Fix return code for invalid parameters X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=043c998f95036e7fc796b240ab5ba49a8de36df3;p=linux-beck.git 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 --- 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)