mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +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
@ -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 New Issue
Block a user