Skip to contentSkip to conversation

can: flexcan: Switch to use dev_err_probe() helper

PATCH Applied Yang Yingliang 3 participants 3 messages Sep 14, 2022 – Sep 17, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/can/flexcan/flexcan-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/can/flexcan/flexcan-core.c +1 -2
index f857968efed7..ac881394e3b4 100644
@@ -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;
 	}
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 4 lines · Yang Yingliang

dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER.

added to linux-can-next

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |
#2 lore raw
In reply to Yang Yingliang
This patch was applied to netdev/net-next.git (master) by Marc Kleine-Budde <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Marc Kleine-Budde <[email protected]>:

Quoted 7 lines · 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.

---
 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html