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

Commit 13c9d934 authored by Johan Hovold's avatar Johan Hovold Committed by David S. Miller
Browse files

net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister



Make sure to drop the of_node reference taken in fixed_phy_register()
when deregistering a PHY.

Fixes: a7595121 ("net: phy: extend fixed driver with
fixed_phy_register()")

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ae30f4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ EXPORT_SYMBOL_GPL(fixed_phy_register);
void fixed_phy_unregister(struct phy_device *phy)
{
	phy_device_remove(phy);

	of_node_put(phy->mdio.dev.of_node);
	fixed_phy_del(phy->mdio.addr);
}
EXPORT_SYMBOL_GPL(fixed_phy_unregister);