summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mdio-sun4i.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/mdio-sun4i.c')
-rw-r--r--drivers/net/phy/mdio-sun4i.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio-sun4i.c b/drivers/net/phy/mdio-sun4i.c
index 58d6504495e0..f798de3276dc 100644
--- a/drivers/net/phy/mdio-sun4i.c
+++ b/drivers/net/phy/mdio-sun4i.c
@@ -145,8 +145,11 @@ err_out_free_mdiobus:
static int sun4i_mdio_remove(struct platform_device *pdev)
{
struct mii_bus *bus = platform_get_drvdata(pdev);
+ struct sun4i_mdio_data *data = bus->priv;
mdiobus_unregister(bus);
+ if (data->regulator)
+ regulator_disable(data->regulator);
mdiobus_free(bus);
return 0;