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: a759512174
("net: phy: extend fixed driver with
fixed_phy_register()")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3ae30f4ce6
commit
13c9d934a5
|
@ -279,7 +279,7 @@ EXPORT_SYMBOL_GPL(fixed_phy_register);
|
||||||
void fixed_phy_unregister(struct phy_device *phy)
|
void fixed_phy_unregister(struct phy_device *phy)
|
||||||
{
|
{
|
||||||
phy_device_remove(phy);
|
phy_device_remove(phy);
|
||||||
|
of_node_put(phy->mdio.dev.of_node);
|
||||||
fixed_phy_del(phy->mdio.addr);
|
fixed_phy_del(phy->mdio.addr);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(fixed_phy_unregister);
|
EXPORT_SYMBOL_GPL(fixed_phy_unregister);
|
||||||
|
|
Loading…
Reference in New Issue