Commit 1c48709e authored by Liang He's avatar Liang He Committed by Jakub Kicinski

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: 66bdede4 ("of_mdio: Fix broken PHY IRQ in case of probe deferral")
Co-developed-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarLiang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220913125659.3331969-1-windhl@126.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent db4192a7
...@@ -231,6 +231,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) ...@@ -231,6 +231,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
return 0; return 0;
unregister: unregister:
of_node_put(child);
mdiobus_unregister(mdio); mdiobus_unregister(mdio);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment