]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i40e: Fix error handling in i40e_init_module()
authorShang XiaoJing <shangxiaojing@huawei.com>
Wed, 16 Nov 2022 01:27:25 +0000 (09:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:55 +0000 (11:23 +0100)
commitdd425cec79baeaad2f93b61647bb41b246856914
tree3e2ba89ffce43772905bd69c3272b6632449f14f
parentf166c62cad798c53300b4b327e44300c73ec492d
i40e: Fix error handling in i40e_init_module()

[ Upstream commit 479dd06149425b9e00477f52200872587af76a48 ]

i40e_init_module() won't free the debugfs directory created by
i40e_dbg_init() when pci_register_driver() failed. Add fail path to
call i40e_dbg_exit() to remove the debugfs entries to prevent the bug.

i40e: Intel(R) Ethernet Connection XL710 Network Driver
i40e: Copyright (c) 2013 - 2019 Intel Corporation.
debugfs: Directory 'i40e' with parent '/' already present!

Fixes: 41c445ff0f48 ("i40e: main driver core")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_main.c