Skip to content

Commit

Permalink
can: flexcan: Switch to use dev_err_probe() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Yingliang authored and Marc Kleine-Budde committed Sep 14, 2022
1 parent bcedce7 commit 1c679f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/can/flexcan/flexcan-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1c679f9

Please sign in to comment.