[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1379676824-19094-1-git-send-email-broonie@kernel.org>
Date: Fri, 20 Sep 2013 12:33:44 +0100
From: Mark Brown <broonie@...nel.org>
To: Liam Girdwood <lgirdwood@...il.com>
Cc: linux-kernel@...r.kernel.org, Mark Brown <broonie@...aro.org>
Subject: [PATCH] regulator: core: Fix return code for invalid parameters
From: Mark Brown <broonie@...aro.org>
We should be returning an error, a repeated call will never succeed.
Signed-off-by: Mark Brown <broonie@...aro.org>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 353779b..dfdec27 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1235,7 +1235,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)
--
1.8.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists