diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-16 15:20:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-17 12:05:05 -0500 |
commit | 13c9d934a5a1d04f055c20c2253090e9afd9a5d1 (patch) | |
tree | 381af7ec4c3b40e0955f9cb8fcf42f3a7a1eb0d5 /drivers | |
parent | 3ae30f4ce65e9d4de274b1472169ab3c27f5c666 (diff) | |
download | linux-13c9d934a5a1d04f055c20c2253090e9afd9a5d1.tar.bz2 |
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: a75951217472 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/fixed_phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c index c649c101bbab..eb5167210681 100644 --- a/drivers/net/phy/fixed_phy.c +++ b/drivers/net/phy/fixed_phy.c @@ -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); |