提交 84b7901f 编写于 作者: A Atsushi Nemoto 提交者: Jeff Garzik

macb: Call phy_disconnect on removing

Call phy_disconnect() on remove routine.  Otherwise the phy timer
causes a kernel crash when unloading.
Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 3d137fdd
...@@ -1257,6 +1257,8 @@ static int __exit macb_remove(struct platform_device *pdev) ...@@ -1257,6 +1257,8 @@ static int __exit macb_remove(struct platform_device *pdev)
if (dev) { if (dev) {
bp = netdev_priv(dev); bp = netdev_priv(dev);
if (bp->phy_dev)
phy_disconnect(bp->phy_dev);
mdiobus_unregister(&bp->mii_bus); mdiobus_unregister(&bp->mii_bus);
kfree(bp->mii_bus.irq); kfree(bp->mii_bus.irq);
unregister_netdev(dev); unregister_netdev(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册