Skip to content

Commit

Permalink
regulator: Fix return value of _set_load() stub
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Nov 20, 2018
1 parent 9cce724 commit f1abf67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/regulator/consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f1abf67

Please sign in to comment.