mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
igb: fix null pointer dereference seen with fiber NICs
With a fiber or serdes NIC installed the driver was causing a null pointer dereference on driver unload. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
106ef2fef3
commit
c743a87eab
1 changed files with 2 additions and 1 deletions
|
@ -1372,7 +1372,8 @@ static void __devexit igb_remove(struct pci_dev *pdev)
|
|||
|
||||
unregister_netdev(netdev);
|
||||
|
||||
if (!igb_check_reset_block(&adapter->hw))
|
||||
if (adapter->hw.phy.ops.reset_phy &&
|
||||
!igb_check_reset_block(&adapter->hw))
|
||||
adapter->hw.phy.ops.reset_phy(&adapter->hw);
|
||||
|
||||
igb_remove_device(&adapter->hw);
|
||||
|
|
Loading…
Reference in a new issue