Re: [PATCH] mfd: rohm-bd*: Use dev_err_probe()

From: Lee Jones
Date: Thu Dec 08 2022 - 08:53:54 EST


On Wed, 23 Nov 2022, Matti Vaittinen wrote:

> The dev_err_probe() has (at least) following benefits over dev_err()
> when printing an error print for a failed function call at a device
> driver probe:
> - Omit error level print if error is 'EPRBE_DEFER'
> - Standardized print format for returned error
> - return the error value allowing shortening calls like:
>
> if (ret) {
> dev_err(...);
> return ret;
> }
>
> to
>
> if (ret)
> return dev_err_probe(...);
>
> Convert the ROHM BD71828, ROHM BD718x7 and ROHM BD9576 core drivers to
> use the dev_err_probe() when returned error is not hard-coded constant.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> ---
> drivers/mfd/rohm-bd71828.c | 23 ++++++++++-------------
> drivers/mfd/rohm-bd718x7.c | 21 ++++++++-------------
> drivers/mfd/rohm-bd9576.c | 17 ++++++++---------
> 3 files changed, 26 insertions(+), 35 deletions(-)

Applied, thanks.

--
Lee Jones [李琼斯]