diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-14 21:40:30 +0800 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-09-14 15:37:32 +0200 |
commit | 1c679f917397f85bda93f7f9b20fb722d4b8b18d (patch) | |
tree | 84ffe5509bd2321c211948652a9d98ee10d3172d /drivers/net | |
parent | bcedce7cf49da06d43bbd0eb47f9f4bcbbb6de12 (diff) |
can: flexcan: Switch to use dev_err_probe() helper
dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/all/20220914134030.3782754-1-yangyingliang@huawei.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/flexcan/flexcan-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c index bbe5b0c997f8..5e27944b8a21 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -2177,8 +2177,7 @@ static int flexcan_probe(struct platform_device *pdev) err = flexcan_setup_stop_mode(pdev); if (err < 0) { - if (err != -EPROBE_DEFER) - dev_err(&pdev->dev, "setup stop mode failed\n"); + dev_err_probe(&pdev->dev, err, "setup stop mode failed\n"); goto failed_setup_stop_mode; } |