mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
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: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2744bf4268
commit
39c68b3fc2
1 changed files with 3 additions and 0 deletions
|
@ -145,8 +145,11 @@ static int sun4i_mdio_probe(struct platform_device *pdev)
|
||||||
static int sun4i_mdio_remove(struct platform_device *pdev)
|
static int sun4i_mdio_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct mii_bus *bus = platform_get_drvdata(pdev);
|
struct mii_bus *bus = platform_get_drvdata(pdev);
|
||||||
|
struct sun4i_mdio_data *data = bus->priv;
|
||||||
|
|
||||||
mdiobus_unregister(bus);
|
mdiobus_unregister(bus);
|
||||||
|
if (data->regulator)
|
||||||
|
regulator_disable(data->regulator);
|
||||||
mdiobus_free(bus);
|
mdiobus_free(bus);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue