diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2008-08-04 17:59:46 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-07 01:55:05 -0400 |
commit | c743a87eabc50110ba5e473e707079c9b429779a (patch) | |
tree | b6d2b6db296050c8ad86c8addc2c8ab1c38707bf /drivers/net/igb | |
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/igb')
-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) | |||
1372 | 1372 | ||
1373 | unregister_netdev(netdev); | 1373 | unregister_netdev(netdev); |
1374 | 1374 | ||
1375 | if (!igb_check_reset_block(&adapter->hw)) | 1375 | if (adapter->hw.phy.ops.reset_phy && |
1376 | !igb_check_reset_block(&adapter->hw)) | ||
1376 | adapter->hw.phy.ops.reset_phy(&adapter->hw); | 1377 | adapter->hw.phy.ops.reset_phy(&adapter->hw); |
1377 | 1378 | ||
1378 | igb_remove_device(&adapter->hw); | 1379 | igb_remove_device(&adapter->hw); |