Commit c743a87e authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Garzik

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: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 106ef2fe
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment