Skip to content

Commit

Permalink
i40e: not all VSIs have rings
Browse files Browse the repository at this point in the history
Once more, with feeling: not all VSIs have rings. To assume so is to
invite null pointers to your party.

Change-ID: I576858824468d9712d119fa1015a1f28c27712c4
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Mitch Williams authored and Jeff Kirsher committed Jun 8, 2014
1 parent e78ac4b commit ddfda80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ static void i40e_update_link_xoff_rx(struct i40e_pf *pf)
for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
struct i40e_vsi *vsi = pf->vsi[v];

if (!vsi)
if (!vsi || !vsi->tx_rings[0])
continue;

for (i = 0; i < vsi->num_queue_pairs; i++) {
Expand Down Expand Up @@ -711,7 +711,7 @@ static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
struct i40e_vsi *vsi = pf->vsi[v];

if (!vsi)
if (!vsi || !vsi->tx_rings[0])
continue;

for (i = 0; i < vsi->num_queue_pairs; i++) {
Expand Down

0 comments on commit ddfda80

Please sign in to comment.