[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220914134030.3782754-1-yangyingliang@huawei.com>
Date: Wed, 14 Sep 2022 21:40:30 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>
CC: <wg@...ndegger.com>, <mkl@...gutronix.de>
Subject: [PATCH -next] 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@...wei.com>
---
drivers/net/can/flexcan/flexcan-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
index f857968efed7..ac881394e3b4 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;
}
--
2.25.1
Powered by blists - more mailing lists