can: kvaser_usb: Simplify with dev_err_probe()
authorYan Zhen <yanzhen@vivo.com>
Fri, 30 Aug 2024 11:06:51 +0000 (19:06 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 30 Aug 2024 20:40:23 +0000 (22:40 +0200)
commit0315c0b5ed253853a7b07dc97487522345110548
treed443535db57c86791d005a181c1228ec9e2024f1
parenta9c0fb33fd454fda5283281e47d556c81ee9fa47
can: kvaser_usb: 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://patch.msgid.link/20240830110651.519119-1-yanzhen@vivo.com
mkl: fix indention
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c