i40e: Fix error handling in i40e_vsi_open
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Sun, 28 Feb 2021 11:50:58 +0000 (19:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:27 +0000 (16:56 +0200)
commit88819239e9fd66cdd303e5290b27d004db3cf5b7
tree975755d197e3d6c72bc12e3a739e7d84a3f70dc0
parentaefa9277440886b8b17c258669b86bef8379a3a1
i40e: Fix error handling in i40e_vsi_open

[ Upstream commit 9c04cfcd4aad232e36306cdc5c74cd9fc9148a7e ]

When vsi->type == I40E_VSI_FDIR, we have caught the return value of
i40e_vsi_request_irq() but without further handling. Check and execute
memory clean on failure just like the other i40e_vsi_request_irq().

Fixes: 8a9eb7d3cbcab ("i40e: rework fdir setup and teardown")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
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