[PATCH] ASoC: cs42l51: improve error handling in cs42l51_remove()
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Thu Oct 21 22:58:39 CEST 2021
On Thu, Oct 21, 2021 at 07:38:08PM +0100, Mark Brown wrote:
> On Thu, Oct 21, 2021 at 12:36:27PM +0200, Uwe Kleine-König wrote:
>
> > a bit unsure if regulator_bulk_force_disable() is indeed the right
> > function here, its documentation specifies a different usecase.
>
> > My motivation for this change was to make it obvious in
> > cs42l51_i2c_remove() that there is no error to handle to eventually make
> > i2c remove callbacks return void, too.
>
> It would be better to just ignore the errors on disable.
Yeah, and part of this is if regulator #1 fails to disable still disable
regulators #2 and #3. (I don't know how many there are.) That was why I
picked regulator_bulk_force_disable() which has this behaviour.
> Realistically you'd have to really be trying to trigger an error here
> and it's most likely that the system is in enough trouble if one is
> triggered that it's just not worrying about. I'm not sure how likely
> it is that anyone would ever remove one of these devices in production
> though.
So compared to my patch you'd just drop the warning?!
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
-------------- 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/20211021/9b399d93/attachment.sig>
More information about the Alsa-devel
mailing list