]> 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)
commit47db58253589894d316201bcdb172269466aba99
tree747df88dfdf546ac834495ae926a64decde78a32
parenta9d4f6858378314c56520398a4ad64f7300f091f
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: aece48068ff1 ("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