netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: mdio: Add of_node_put() when breaking out of for_each_xx
@ 2022-07-27  7:44 Liang He
  2022-07-28 16:47 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2022-07-27  7:44 UTC (permalink / raw)
  To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
	windhl, linmq006

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 <linmq006@gmail.com>
Signed-off-by: Liang He <windhl@126.com>
---
 drivers/net/mdio/of_mdio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
index 9e3c815a070f..796e9c7857d0 100644
--- a/drivers/net/mdio/of_mdio.c
+++ b/drivers/net/mdio/of_mdio.c
@@ -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;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: mdio: Add of_node_put() when breaking out of for_each_xx
  2022-07-27  7:44 [PATCH] of: mdio: Add of_node_put() when breaking out of for_each_xx Liang He
@ 2022-07-28 16:47 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-07-28 16:47 UTC (permalink / raw)
  To: Liang He
  Cc: andrew, hkallweit1, linux, davem, edumazet, pabeni, netdev, linmq006

On Wed, 27 Jul 2022 15:44:09 +0800 Liang He wrote:
> 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 <linmq006@gmail.com>

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.

> Signed-off-by: Liang He <windhl@126.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-28 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27  7:44 [PATCH] of: mdio: Add of_node_put() when breaking out of for_each_xx Liang He
2022-07-28 16:47 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).