Commit f534039d authored by John Underwood's avatar John Underwood Committed by Jeff Kirsher

i40e: add check for null VSI

Return from i40e_vsi_reinit_setup() if vsi param is NULL.
This makes this code consistent with all the other code that
checks for NULL before using one of the VSI pointers accessed
with an indexed variable. (Indexed VSI pointers are
intentionally set to NULL in i40e_vsi_clear() and
i40e_remove().

Change-ID: I3bc8b909c70fd2439334eeae994d151f61480985
Signed-off-by: default avatarJohn Underwood <johnx.underwood@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent fe726082
...@@ -9583,10 +9583,15 @@ static int i40e_vsi_setup_vectors(struct i40e_vsi *vsi) ...@@ -9583,10 +9583,15 @@ static int i40e_vsi_setup_vectors(struct i40e_vsi *vsi)
**/ **/
static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi) static struct i40e_vsi *i40e_vsi_reinit_setup(struct i40e_vsi *vsi)
{ {
struct i40e_pf *pf = vsi->back; struct i40e_pf *pf;
u8 enabled_tc; u8 enabled_tc;
int ret; int ret;
if (!vsi)
return NULL;
pf = vsi->back;
i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx); i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx);
i40e_vsi_clear_rings(vsi); i40e_vsi_clear_rings(vsi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment