Skip to content

Commit

Permalink
igb: fix null pointer dereference seen with fiber NICs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Duyck authored and Jeff Garzik committed Aug 7, 2008
1 parent 106ef2f commit c743a87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c743a87

Please sign in to comment.