of: mdio: Add of_node_put() when breaking out of for_each_xx
Subsystems (3)
PATCH 1/1 of: mdio: Add of_node_put() when breaking out of for_each_xx
In of_mdiobus_register(), we should call of_node_put() for 'child' escaped out of for_each_available_child_of_node().
Fixes 66bdede495c7 ("of_mdio: Fix broken PHY IRQ in case of probe deferral")
Co-authored-by Miaoqian Lin <[email protected]>
Signed-off-by Liang He <[email protected]>
--- drivers/net/mdio/of_mdio.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/mdio/of_mdio.c +1 -0
@@ -231,6 +231,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)return 0 ; unregister: +of_node_put (child);mdiobus_unregister (mdio);return rc; }
Signature · 1 line
2.25.1
Jakub Kicinski
maintainerQuoted 5 lines · On Wed, 27 Jul 2022 15:44:09 +0800 Liang He wrote:
In
of_mdiobus_register(), we should callof_node_put()for 'child' escaped out offor_each_available_child_of_node().Fixes 66bdede495c7 ("of_mdio: Fix broken PHY IRQ in case of probe deferral")Co-authored-by Miaoqian Lin <[email protected]>
The standard tag is Co-developed-by, and the other developer must also provide their sign-off. When reposting please make sure to CC the author of the patch under Fixes.
Quoted 1 line
Signed-off-by Liang He <[email protected]>