]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: supply: max17042: use dev_err_probe() where appropriate
authorAndré Draszik <andre.draszik@linaro.org>
Mon, 2 Mar 2026 13:32:04 +0000 (13:32 +0000)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 3 Mar 2026 22:58:07 +0000 (23:58 +0100)
commit699f0f71ac98cf79fecdcab0a604b25f11c580b6
tree3bac573a803a26117a5b8f87cec9c5554af1ca9f
parente370b67c2ceb3e3c4577da0a882b1ede87ef485e
power: supply: max17042: use dev_err_probe() where appropriate

dev_err_probe() exists to simplify code, harmonise error messages, and
set the deferred probe reason if relevant - there's no reason not to
use it here.

While at it, return the actual error from devm_regmap_init_i2c() rather
than overwriting with -EINVAL, when relevant.

Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260302-max77759-fg-v3-5-3c5f01dbda23@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max17042_battery.c