diff options
author | Matti Vaittinen <mazziesaccount@gmail.com> | 2022-11-23 13:00:38 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-11-23 14:09:06 +0100 |
commit | 662a9bf883f42d09145cf083d93dadf0307f15ea (patch) | |
tree | 10295a45a4f6598e5570ccde333aa3b021144d8d /drivers/regulator/88pg86x.c | |
parent | regulator: bd71815: bd71828: bd9576: Use dev_err_probe() (diff) | |
download | linux-662a9bf883f42d09145cf083d93dadf0307f15ea.tar.xz linux-662a9bf883f42d09145cf083d93dadf0307f15ea.zip |
regulator: bd718x7: 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 BD718x7 regulator driver to use the dev_err_probe() when
returned error is not hard-coded constant.
NOTE:
This commit also changes the error handling path to return immediately
from a spot where the error is spotted instead of using a single point
of exit.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/fee54c2d04bb41b51381e31523f9ed31575206d2.1669203610.git.mazziesaccount@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/88pg86x.c')
0 files changed, 0 insertions, 0 deletions