]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: check for null in iavf_fix_features
authorNicholas Nunley <nicholas.d.nunley@intel.com>
Fri, 4 Jun 2021 16:48:53 +0000 (09:48 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 15 Nov 2021 23:40:03 +0000 (15:40 -0800)
commitcffbe1fe63e51ec55f12a16d551f9456e862b951
tree747df88dfdf546ac834495ae926a64decde78a32
parentdde368b7039497fdb7383e4a9453531695a5ab28
iavf: check for null in iavf_fix_features

If the driver has lost contact with the PF then it enters a disabled state
and frees adapter->vf_res. However, ndo_fix_features can still be called on
the interface, so we need to check for this condition first. Since we have
no information on the features at this time simply leave them unmodified
and return.

Fixes: e428b5f98673 ("i40evf: Fix VLAN features")
Signed-off-by: Nicholas Nunley <nicholas.d.nunley@intel.com>
Tested-by: Tony Brelinski <tony.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c