regulator: Fix return value of _set_load() stub
authorMark Brown <broonie@kernel.org>
Sat, 17 Nov 2018 03:19:30 +0000 (19:19 -0800)
committerMark Brown <broonie@kernel.org>
Tue, 20 Nov 2018 15:22:46 +0000 (15:22 +0000)
The stub implementation of _set_load() returns a mode value which is
within the bounds of valid return codes for success (the documentation
just says that failures are negative error codes) but not sensible or
what the actual implementation does.  Fix it to just return 0.

Reported-by: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/regulator/consumer.h

index 25602afd48447f3c410f79082e966b1d4589d911..f3f76051e8b008346a0e7acd4b6512d7ecef85f3 100644 (file)
@@ -508,7 +508,7 @@ static inline int regulator_get_error_flags(struct regulator *regulator,
 
 static inline int regulator_set_load(struct regulator *regulator, int load_uA)
 {
-       return REGULATOR_MODE_NORMAL;
+       return 0;
 }
 
 static inline int regulator_allow_bypass(struct regulator *regulator,