regulator: stubs: Make stub regulator_get_voltage() return an error
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 11 Jun 2012 12:14:24 +0000 (20:14 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 18 Jun 2012 12:39:59 +0000 (13:39 +0100)
Returning 0 isn't useful, it's not even meaningful if there is a real
regulator there.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/linux/regulator/consumer.h

index 4ed1b30ac5fc9ff04cf2a50b1b4ba91e1718e2b7..9ff29ef317c24561d6f62d1b29e6e8ff1bb3e7e2 100644 (file)
@@ -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,