From: Johan Hovold Date: Wed, 16 Nov 2016 14:20:38 +0000 (+0100) Subject: net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13c9d934a5a1d04f055c20c2253090e9afd9a5d1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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);