net: macb: NULL out phydev after removing mdio bus
[cascardo/linux.git] / drivers / net / ethernet / cadence / macb.c
index 63144bb..b32444a 100644 (file)
@@ -3117,6 +3117,7 @@ static int macb_remove(struct platform_device *pdev)
                if (dev->phydev)
                        phy_disconnect(dev->phydev);
                mdiobus_unregister(bp->mii_bus);
+               dev->phydev = NULL;
                mdiobus_free(bp->mii_bus);
 
                /* Shutdown the PHY if there is a GPIO reset */