Commit 7b7cdc73 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by sanglipeng
Browse files

i40e: Fix error handling in i40e_init_module()

stable inclusion
from stable-v5.10.158
commit dd425cec79baeaad2f93b61647bb41b246856914
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=dd425cec79baeaad2f93b61647bb41b246856914



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

[ Upstream commit 479dd061 ]

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: 41c445ff ("i40e: main driver core")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
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 65b9da38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment