Skip to contentSkip to conversation

regulator: Return an error from stubbed regulator_get_exclusive()

PATCH New Mark Brown 1 participant 1 message Oct 24, 2014 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regulator: Return an error from stubbed regulator_get_exclusive()

The user hasn't got a regulator and shouldn't be mislead into thinking they have one; really we should probably remove this stub entirely (and may well before the next merge window).

---
 include/linux/regulator/consumer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/regulator/consumer.h +1 -1
index f540b14..3c4fad5 100644
@@ -284,7 +284,7 @@ devm_regulator_get(struct device *dev, const char *id)
 static inline struct regulator *__must_check
 regulator_get_exclusive(struct device *dev, const char *id)
 {
-	return NULL;
+	return ERR_PTR(-ENODEV);
 }
 
 static inline struct regulator *__must_check
Signature · 1 line
2.1.1