mfd: rohm: Use dev_err_probe()
authorMatti Vaittinen <mazziesaccount@gmail.com>
Wed, 23 Nov 2022 09:19:49 +0000 (11:19 +0200)
committerLee Jones <lee@kernel.org>
Thu, 8 Dec 2022 13:52:58 +0000 (13:52 +0000)
commitcb83cb0dfa821b9c91cc9b2e3473f0ea42e11461
tree9ba7cd76ee4a74e2f2f1cc98521135cdfebc3aaf
parent96836a35ffb3bcdf412d5753363daf5ee3e68548
mfd: rohm: Use dev_err_probe()

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@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/Y33lte0PKd2u6dyR@fedora
drivers/mfd/rohm-bd71828.c
drivers/mfd/rohm-bd718x7.c
drivers/mfd/rohm-bd9576.c