Commit 7fe05e12 authored by Benjamin Mikailenko's avatar Benjamin Mikailenko Committed by Tony Nguyen
Browse files

ice: Fix VSI rebuild WARN_ON check for VF



In commit b03d519d ("ice: store VF pointer instead of VF ID")
WARN_ON checks were added to validate the vsi->vf pointer and
catch programming errors. However, one check to vsi->vf was missed.
This caused a call trace when resetting VFs.

Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check.

Fixes: b03d519d ("ice: store VF pointer instead of VF ID")
Signed-off-by: default avatarBenjamin Mikailenko <benjamin.mikailenko@intel.com>
Tested-by: default avatarMarek Szlosek <marek.szlosek@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 84ba2890
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3181,7 +3181,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)

	pf = vsi->back;
	vtype = vsi->type;
	if (WARN_ON(vtype == ICE_VSI_VF) && !vsi->vf)
	if (WARN_ON(vtype == ICE_VSI_VF && !vsi->vf))
		return -EINVAL;

	ice_vsi_init_vlan_ops(vsi);