Skip to contentSkip to conversation

regulator: core: Fix default return value for _get()

PATCH In review Mark Brown 2 participants 2 messages Sep 20, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regulator: core: Fix default return value for _get()

From: Mark Brown <[email protected]>

Now that we are defaulting to providing dummy regulators fix the logic for substituting a dummy by making the default return code -EPROBE_DEFER.

---

Not tested at all.

 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/core.c +1 -1
index 4eefcc3..353779b 100644
@@ -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");
Signature · 1 line
1.8.4.rc3
Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mark Brown

From: Mark Brown <[email protected]>

Now that we are defaulting to providing dummy regulators fix the logic for substituting a dummy by making the default return code -EPROBE_DEFER.

Quoted 8 lines

---

Not tested at all.

 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)