Re: [PATCH] regulator: Fix return value of _set_load() stub

From: Doug Anderson
Date: Mon Nov 19 2018 - 12:23:46 EST


Hi,

On Fri, Nov 16, 2018 at 7:21 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxx>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
> ---
> include/linux/regulator/consumer.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

I had the same patch in my queue to send up. Note that the
documentation of the function was changed in commit e39ce48f5362
("regulator: Rename regulator_set_optimum_mode") though that patch
didn't actually change the code in any significant way so presumably
the bug is from even before that.

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>