diff mbox series

[v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue

Message ID 20221203070259.19560-1-linqiheng@huawei.com (mailing list archive)
State Accepted
Commit 7b8232bdb1789a257de3129a9bb08c69b93a17db
Delegated to: Netdev Maintainers
Headers show
Series [v2] net: microchip: sparx5: Fix missing destroy_workqueue of mact_queue | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Qiheng Lin Dec. 3, 2022, 7:02 a.m. UTC
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(+)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 6, 2022, 11 a.m. UTC | #1
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!
diff mbox series

Patch

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