Skip to contentSkip to conversation

regulator: stubs: Make stub regulator_get_voltage() return an error

PATCH New Mark Brown 1 participant 1 message Jun 11, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: stubs: Make stub regulator_get_voltage() return an error

Returning 0 isn't useful, it's not even meaningful if there is a real regulator there.

---
 include/linux/regulator/consumer.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/regulator/consumer.h +1 -1
index ed05443..bb5b3a2 100644
@@ -291,7 +291,7 @@ static inline int regulator_set_voltage(struct regulator *regulator,
 
 static inline int regulator_get_voltage(struct regulator *regulator)
 {
-	return 0;
+	return -EINVAL;
 }
 
 static inline int regulator_set_current_limit(struct regulator *regulator,
Signature · 1 line
1.7.10