Skip to contentSkip to conversation

net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init

PATCH Applied Zheng Bin 2 participants 2 messages May 13, 2022 – May 16, 2022

Subsystems (3)
lore
Share & tools
lore

Zheng Bin

author
#0 lore raw

PATCH v2 1/1 net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init

hinic_pf_to_mgmt_init misses destroy_workqueue in error path, this patch fixes that.

Fixes 6dbb89014dc3 ("hinic: fix sending mailbox timeout in aeq event work")

---
v1->v2: add Fixes tag

 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c +2 -0
index ebc77771f5da..4aa1f433ed24 100644
@@ -643,6 +643,7 @@ int hinic_pf_to_mgmt_init(struct hinic_pf_to_mgmt *pf_to_mgmt,
 	err = alloc_msg_buf(pf_to_mgmt);
 	if (err) {
 		dev_err(&pdev->dev, "Failed to allocate msg buffers\n");
+		destroy_workqueue(pf_to_mgmt->workq);
 		hinic_health_reporters_destroy(hwdev->devlink_dev);
 		return err;
 	}
@@ -650,6 +651,7 @@ int hinic_pf_to_mgmt_init(struct hinic_pf_to_mgmt *pf_to_mgmt,
 	err = hinic_api_cmd_init(pf_to_mgmt->cmd_chain, hwif);
 	if (err) {
 		dev_err(&pdev->dev, "Failed to initialize cmd chains\n");
+		destroy_workqueue(pf_to_mgmt->workq);
 		hinic_health_reporters_destroy(hwdev->devlink_dev);
 		return err;
 	}

--
2.31.1

#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 11 lines · On Fri, 13 May 2022 15:09:22 +0800 you wrote:

hinic_pf_to_mgmt_init misses destroy_workqueue in error path, this patch fixes that.

Fixes 6dbb89014dc3 ("hinic: fix sending mailbox timeout in aeq event work")

---
v1->v2: add Fixes tag

 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c | 2 ++
 1 file changed, 2 insertions(+)

[...]

Here is the summary with links:
- [v2,-next] net: hinic: add missing destroy_workqueue in hinic_pf_to_mgmt_init

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

You are awesome, thank you!

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