提交 c743a87e 编写于 作者: A Alexander Duyck 提交者: 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: NAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册