All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: renesas: rcar-gen2: Fix double of_node_put on phy creation failure
@ 2026-08-03 12:43 ` Felix Gu
  0 siblings, 0 replies; 9+ messages in thread
From: Felix Gu @ 2026-08-03 12:43 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Geert Uytterhoeven, Magnus Damm,
	Krzysztof Kozlowski
  Cc: linux-phy, linux-renesas-soc, linux-kernel, Felix Gu

for_each_child_of_node_scoped() releases the node reference on scope
exit, so the explicit of_node_put(np) in the devm_phy_create() error
path drops it twice.

Drop the redundant of_node_put() and let the scoped cleanup handle it.

Fixes: b64b32791fb5 ("phy: renesas: rcar-gen2: Simplify with scoped for each OF child loop")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/phy/renesas/phy-rcar-gen2.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/phy/renesas/phy-rcar-gen2.c b/drivers/phy/renesas/phy-rcar-gen2.c
index 6c671254c625..5a272e25e051 100644
--- a/drivers/phy/renesas/phy-rcar-gen2.c
+++ b/drivers/phy/renesas/phy-rcar-gen2.c
@@ -405,7 +405,6 @@ static int rcar_gen2_phy_probe(struct platform_device *pdev)
 						   data->gen2_phy_ops);
 			if (IS_ERR(phy->phy)) {
 				dev_err(dev, "Failed to create PHY\n");
-				of_node_put(np);
 				return PTR_ERR(phy->phy);
 			}
 			phy_set_drvdata(phy->phy, phy);

---
base-commit: 415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-rcar-gen2-140f014cd384

Best regards,
--  
Felix Gu <ustc.gu@gmail.com>


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

end of thread, other threads:[~2026-08-06 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 12:43 [PATCH] phy: renesas: rcar-gen2: Fix double of_node_put on phy creation failure Felix Gu
2026-08-03 12:43 ` Felix Gu
2026-08-03 12:54 ` sashiko-bot
2026-08-03 13:09 ` Krzysztof Kozlowski
2026-08-03 13:09   ` Krzysztof Kozlowski
2026-08-03 13:21 ` Biju Das
2026-08-03 13:21   ` Biju Das
2026-08-06 16:26 ` Vinod Koul
2026-08-06 16:26   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.