]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal/drivers/brcmstb_thermal: Simplify with dev_err_probe()
authorYan Zhen <yanzhen@vivo.com>
Fri, 30 Aug 2024 10:39:18 +0000 (18:39 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 2 Sep 2024 11:09:49 +0000 (13:09 +0200)
commitb779bbb9df180e2ab5c89c666e01fe03eef7dc49
tree962de97db190ed2092f39d57e228f8c6bc02a85a
parent8e12f1f88196b67975e664a35e230b3b2292d10b
thermal/drivers/brcmstb_thermal: Simplify with dev_err_probe()

dev_err_probe() is used to log an error message during the probe process
of a device.

It can simplify the error path and unify a message template.

Using this helper is totally fine even if err is known to never
be -EPROBE_DEFER.

The benefit compared to a normal dev_err() is the standardized format
of the error code, it being emitted symbolically and the fact that
the error code is returned which allows more compact error paths.

Signed-off-by: Yan Zhen <yanzhen@vivo.com>
Link: https://lore.kernel.org/r/20240830103918.501234-1-yanzhen@vivo.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/broadcom/brcmstb_thermal.c