diff mbox series

[-next] can: flexcan: Switch to use dev_err_probe() helper

Message ID 20220914134030.3782754-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Commit 1c679f917397f85bda93f7f9b20fb722d4b8b18d
Delegated to: Netdev Maintainers
Headers show
Series [-next] can: flexcan: Switch to use dev_err_probe() helper | expand

Checks

Context Check Description
netdev/tree_selection success Series ignored based on subject

Commit Message

Yang Yingliang Sept. 14, 2022, 1:40 p.m. UTC
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>
---
 drivers/net/can/flexcan/flexcan-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Marc Kleine-Budde Sept. 14, 2022, 1:38 p.m. UTC | #1
On 14.09.2022 21:40:30, Yang Yingliang wrote:
> 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>

added to linux-can-next

Thanks,
Marc
patchwork-bot+netdevbpf@kernel.org Sept. 17, 2022, 7:20 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Marc Kleine-Budde <mkl@pengutronix.de>:

On Wed, 14 Sep 2022 21:40:30 +0800 you wrote:
> 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>
> ---
>  drivers/net/can/flexcan/flexcan-core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
  - [-next] can: flexcan: Switch to use dev_err_probe() helper
    https://git.kernel.org/netdev/net-next/c/1c679f917397

You are awesome, thank you!
diff mbox series

Patch

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;
 	}