summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c
diff options
context:
space:
mode:
authorhuhai <huhai@kylinos.cn>2019-07-22 19:55:59 +0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-08-22 13:24:13 -0700
commit408bfc382efca14cc02c57ae935d5b7efd72e02a (patch)
treeac2921a5e7686368df93dd397da8ee63e47cfe2c /drivers/net/ethernet/intel/i40e/i40e_main.c
parentbc6c1eaaedee7bb1bbdef27e155f15510128762e (diff)
downloadtalos-op-linux-408bfc382efca14cc02c57ae935d5b7efd72e02a.tar.gz
talos-op-linux-408bfc382efca14cc02c57ae935d5b7efd72e02a.zip
i40e: add check on i40e_configure_tx_ring() return value
When i40e_configure_tx_ring(vsi->tx_rings[i]) returns an error, we should exit from i40e_vsi_configure_tx and return the error, instead of continuing to check whether xdp is enable, and configure the xdp transmit ring. Signed-off-by: huhai <huhai@kylinos.cn> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 6d456e579314..b807dd6b1417 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3364,7 +3364,7 @@ static int i40e_vsi_configure_tx(struct i40e_vsi *vsi)
for (i = 0; (i < vsi->num_queue_pairs) && !err; i++)
err = i40e_configure_tx_ring(vsi->tx_rings[i]);
- if (!i40e_enabled_xdp_vsi(vsi))
+ if (err || !i40e_enabled_xdp_vsi(vsi))
return err;
for (i = 0; (i < vsi->num_queue_pairs) && !err; i++)
OpenPOWER on IntegriCloud