Commit add6077d authored by Yuan Can's avatar Yuan Can Committed by sanglipeng
Browse files

iavf: Fix error handling in iavf_init_module()

stable inclusion
from stable-v5.10.158
commit 971c55f0763b480e63ceb7a22beb19be2509e5ed
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=971c55f0763b480e63ceb7a22beb19be2509e5ed



--------------------------------

[ Upstream commit 227d8d2f ]

The iavf_init_module() won't destroy workqueue when pci_register_driver()
failed. Call destroy_workqueue() when pci_register_driver() failed to
prevent the resource leak.

Similar to the handling of u132_hcd_init in commit f276e002
("usb: u132-hcd: fix resource leak")

Fixes: 2803b16c ("i40e/i40evf: Use private workqueue")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 6cd105f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment