Skip to content

Commit

Permalink
macb: Call phy_disconnect on removing
Browse files Browse the repository at this point in the history
Call phy_disconnect() on remove routine.  Otherwise the phy timer
causes a kernel crash when unloading.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Atsushi Nemoto authored and Jeff Garzik committed Apr 12, 2008
1 parent 3d137fd commit 84b7901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,8 @@ static int __exit macb_remove(struct platform_device *pdev)

if (dev) {
bp = netdev_priv(dev);
if (bp->phy_dev)
phy_disconnect(bp->phy_dev);
mdiobus_unregister(&bp->mii_bus);
kfree(bp->mii_bus.irq);
unregister_netdev(dev);
Expand Down

0 comments on commit 84b7901

Please sign in to comment.