diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2008-08-04 14:59:46 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-07 01:55:05 -0400 |
commit | c743a87eabc50110ba5e473e707079c9b429779a (patch) | |
tree | b6d2b6db296050c8ad86c8addc2c8ab1c38707bf /drivers/net | |
parent | 106ef2fef3778f4af2e0f796a108cc19c6114264 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/igb/igb_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index f23a0487bf13..cfed2b07f3a4 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -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); |