[alsa-devel] [PATCH] ASoC: rt5663: Fix error handling of regulator_set_load

Mark Brown broonie at kernel.org
Sat Nov 17 04:18:28 CET 2018


On Fri, Nov 16, 2018 at 05:28:56PM +0800, Cheng-Yi Chiang wrote:
> The default implementation of regulator_set_load returns
> REGULATOR_MODE_NORMAL, which is positive.

The stub does indeed do that however that just looks like a bug - the
actual implementation returns 0 on success and the other users don't
seem to expect to get a mode value back.

> rt5663_i2c_probe should only do error handling when return value of
> regulator_set_load is negative.
> In this case, rt5663_i2c_probe should return error.

However that's also true so the patch is valid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20181116/0dbdae75/attachment.sig>


More information about the Alsa-devel mailing list