netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue
@ 2022-12-03  7:02 Qiheng Lin
  2022-12-06 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Qiheng Lin @ 2022-12-03  7:02 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni
  Cc: lars.povlsen, Steen.Hegelund, daniel.machon, UNGLinuxDriver,
	netdev, linux-arm-kernel, linux-kernel, linqiheng

The mchp_sparx5_probe() won't destroy workqueue created by
create_singlethread_workqueue() in sparx5_start() when later
inits failed. Add destroy_workqueue in the cleanup_ports case,
also add it in mchp_sparx5_remove()

Fixes: b37a1bae742f ("net: sparx5: add mactable support")
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
---

v2:
 - add the Fixes tag.

 drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
index eeac04b84638..b6bbb3c9bd7a 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
@@ -887,6 +887,8 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
 
 cleanup_ports:
 	sparx5_cleanup_ports(sparx5);
+	if (sparx5->mact_queue)
+		destroy_workqueue(sparx5->mact_queue);
 cleanup_config:
 	kfree(configs);
 cleanup_pnode:
@@ -911,6 +913,7 @@ static int mchp_sparx5_remove(struct platform_device *pdev)
 	sparx5_cleanup_ports(sparx5);
 	/* Unregister netdevs */
 	sparx5_unregister_notifier_blocks(sparx5);
+	destroy_workqueue(sparx5->mact_queue);
 
 	return 0;
 }
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue
  2022-12-03  7:02 [PATCH v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue Qiheng Lin
@ 2022-12-06 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-06 11:00 UTC (permalink / raw)
  To: Qiheng Lin
  Cc: davem, edumazet, kuba, pabeni, lars.povlsen, Steen.Hegelund,
	daniel.machon, UNGLinuxDriver, netdev, linux-arm-kernel,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Sat, 3 Dec 2022 15:02:59 +0800 you wrote:
> The mchp_sparx5_probe() won't destroy workqueue created by
> create_singlethread_workqueue() in sparx5_start() when later
> inits failed. Add destroy_workqueue in the cleanup_ports case,
> also add it in mchp_sparx5_remove()
> 
> Fixes: b37a1bae742f ("net: sparx5: add mactable support")
> Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
> 
> [...]

Here is the summary with links:
  - [v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue
    https://git.kernel.org/netdev/net/c/7b8232bdb178

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-06 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-03  7:02 [PATCH v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue Qiheng Lin
2022-12-06 11:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).