mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
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: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
3d137fdd16
commit
84b7901f8d
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user