]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
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>
Tue, 20 Jul 2021 14:15:52 +0000 (16:15 +0200)
[ 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

index fa0e7582159ff7d35d4f948642d91120e9bc08f5..1b101b526ed354664492fc2200fbd29c78377bac 100644 (file)
@@ -7743,6 +7743,8 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
                         dev_driver_string(&pf->pdev->dev),
                         dev_name(&pf->pdev->dev));
                err = i40e_vsi_request_irq(vsi, int_name);
+               if (err)
+                       goto err_setup_rx;
 
        } else {
                err = -EINVAL;