Re: [PATCH v2] mfd: stmfx: Improve error message triggered by regulator fault in .remove()

From: Lee Jones
Date: Mon Feb 14 2022 - 10:12:40 EST


On Mon, 14 Feb 2022, Uwe Kleine-König wrote:

> Returning a non-zero value in an i2c remove callback results in the i2c
> core emitting a very generic error message ("remove failed (-ESOMETHING),
> will be ignored") and as the message indicates not further error handling
> is done.
>
> Instead emit a more specific error message and then return zero in
> .remove().
>
> The long-term goal is to make the i2c remove prototype return void, making
> all implementations return 0 is preparatory work for this change.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
> Changes since (implicit) v1:
>
> - put declaration of ret and assignment in two lines.
> (requested by Lee Jones)
>
> drivers/mfd/stmfx.c | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)

Applied, thanks.

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog