i40e: not all VSIs have rings

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>
This commit is contained in:
Mitch Williams 2014-05-10 04:49:10 +00:00 committed by Jeff Kirsher
parent e78ac4bff2
commit ddfda80f04

View file

@ -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++) {
@ -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++) {