Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39c68b3f authored by Chuhong Yuan's avatar Chuhong Yuan Committed by David S. Miller
Browse files

phy: mdio-sun4i: add missed regulator_disable in remove



The driver forgets to disable the regulator in remove like what is done
in probe failure.
Add the missed call to fix it.

Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2744bf42
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -145,8 +145,11 @@ static int sun4i_mdio_probe(struct platform_device *pdev)
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;