Skip to contentSkip to conversation

net: enetc: fix the error handling in enetc4_pf_netdev_create()

PATCH Applied Wei Fang 3 participants 3 messages May 16, 2025 – May 21, 2025

Subsystems (4)
lore
Share & tools
lore

Wei Fang

author maintainer
#0 lore raw

PATCH 1/1 net: enetc: fix the error handling in enetc4_pf_netdev_create()

Fix the handling of err_wq_init and err_reg_netdev paths in enetc4_pf_netdev_create() function.

Fixes 6c5bafba347b ("net: enetc: add MAC filtering for i.MX95 ENETC PF")
---
 drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/enetc/enetc4_pf.c +2 -1
index c16378eb50bc..b3dc1afeefd1 100644
@@ -971,8 +971,9 @@ static int enetc4_pf_netdev_create(struct enetc_si *si)
 	return 0;
 
 err_reg_netdev:
-	enetc4_link_deinit(priv);
+	destroy_workqueue(si->workqueue);
 err_wq_init:
+	enetc4_link_deinit(priv);
 err_link_init:
 	enetc_free_msix(priv);
 err_alloc_msix:
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Wei Fang

Fix the handling of err_wq_init and err_reg_netdev paths in enetc4_pf_netdev_create() function.

Fixes 6c5bafba347b ("net: enetc: add MAC filtering for i.MX95 ENETC PF")

I note that this is a fox for a commit is present in net-next but not net. Thus a Fixes tag + target of net-next is appropriate.

#2 lore raw
In reply to Wei Fang
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 16 May 2025 13:27:34 +0800 you wrote:

Fix the handling of err_wq_init and err_reg_netdev paths in enetc4_pf_netdev_create() function.

Fixes 6c5bafba347b ("net: enetc: add MAC filtering for i.MX95 ENETC PF")
---
 drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
- [net-next] net: enetc: fix the error handling in enetc4_pf_netdev_create()

    https://git.kernel.org/netdev/net-next/c/b98b70c103de

You are awesome, thank you!

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