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.
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 4ed1b30..9ff29ef 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -291,7 +291,7 @@
static inline int regulator_get_voltage(struct regulator *regulator)
{
- return 0;
+ return -EINVAL;
}
static inline int regulator_set_current_limit(struct regulator *regulator,