]> git.baikalelectronics.ru Git - kernel.git/commit
i40evf: Don't Panic
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 12 Apr 2016 15:30:41 +0000 (08:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 26 Apr 2016 10:43:46 +0000 (03:43 -0700)
commit1ca5d2ba7b04d5573833681de80717eac7c25fce
treef34137149c19a2b360005a5a001d9e187ebb094d
parent2c9f8675de74e9f5f38aa6ec81473142349790be
i40evf: Don't Panic

Under some circumstances the driver remove function may be called before
the driver is fully initialized. So we can't assume that we know where
our towel is at, or that all of the data structures are initialized.

To ensure that we don't panic, check that the vsi_res pointer is valid
before dereferencing it. Then drink beer and eat peanuts.

Change-ID: If697b4db57348e39f9538793e16aa755e3e1af03
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf.h