summaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2008-08-04 23:59:46 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-08-07 07:55:05 +0200
commitc743a87eabc50110ba5e473e707079c9b429779a (patch)
treeb6d2b6db296050c8ad86c8addc2c8ab1c38707bf /drivers/net/igb
parentigb: fix comments (diff)
downloadlinux-c743a87eabc50110ba5e473e707079c9b429779a.tar.xz
linux-c743a87eabc50110ba5e473e707079c9b429779a.zip
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/igb')
-rw-r--r--drivers/net/igb/igb_main.c3
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);