[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1379676289-18882-1-git-send-email-broonie@kernel.org>
Date: Fri, 20 Sep 2013 12:24:49 +0100
From: Mark Brown <broonie@...nel.org>
To: Thierry Reding <treding@...dia.com>,
Liam Girdwood <lgirdwood@...il.com>
Cc: linux-kernel@...r.kernel.org, Mark Brown <broonie@...aro.org>
Subject: [PATCH] regulator: core: Fix default return value for _get()
From: Mark Brown <broonie@...aro.org>
Now that we are defaulting to providing dummy regulators fix the logic
for substituting a dummy by making the default return code -EPROBE_DEFER.
Reported-by: Thierry Reding <treding@...dia.com>
Signed-off-by: Mark Brown <broonie@...aro.org>
---
Not tested at all.
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 4eefcc3..353779b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1231,7 +1231,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
struct regulator_dev *rdev;
struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
const char *devname = NULL;
- int ret = 0;
+ int ret = -EPROBE_DEFER;
if (id == NULL) {
pr_err("get() with no identifier\n");
--
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