* [PATCH net v2] net: phy: intel-xway: fix OF node refcount leakage
@ 2026-01-19 0:41 Daniel Golle
2026-01-21 0:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Golle @ 2026-01-19 0:41 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Daniel Golle, netdev,
linux-kernel
Automated review spotted am OF node reference count leakage when
checking if the 'leds' child node exists.
Call of_put_node() to correctly maintain the refcount.
Link: https://netdev-ai.bots.linux.dev/ai-review.html?id=20f173ba-0c64-422b-a663-fea4b4ad01d0
Fixes: 1758af47b98c1 ("net: phy: intel-xway: add support for PHY LEDs")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
v2: fix Fixes:-tag
drivers/net/phy/intel-xway.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/intel-xway.c b/drivers/net/phy/intel-xway.c
index 9766dd99afaa0..12ff4c1f285d2 100644
--- a/drivers/net/phy/intel-xway.c
+++ b/drivers/net/phy/intel-xway.c
@@ -277,7 +277,7 @@ static int xway_gphy_init_leds(struct phy_device *phydev)
static int xway_gphy_config_init(struct phy_device *phydev)
{
- struct device_node *np = phydev->mdio.dev.of_node;
+ struct device_node *np;
int err;
/* Mask all interrupts */
@@ -286,7 +286,10 @@ static int xway_gphy_config_init(struct phy_device *phydev)
return err;
/* Use default LED configuration if 'leds' node isn't defined */
- if (!of_get_child_by_name(np, "leds"))
+ np = of_get_child_by_name(phydev->mdio.dev.of_node, "leds");
+ if (np)
+ of_node_put(np);
+ else
xway_gphy_init_leds(phydev);
/* Clear all pending interrupts */
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net v2] net: phy: intel-xway: fix OF node refcount leakage
2026-01-19 0:41 [PATCH net v2] net: phy: intel-xway: fix OF node refcount leakage Daniel Golle
@ 2026-01-21 0:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-21 0:10 UTC (permalink / raw)
To: Daniel Golle
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 19 Jan 2026 00:41:54 +0000 you wrote:
> Automated review spotted am OF node reference count leakage when
> checking if the 'leds' child node exists.
>
> Call of_put_node() to correctly maintain the refcount.
>
> Link: https://netdev-ai.bots.linux.dev/ai-review.html?id=20f173ba-0c64-422b-a663-fea4b4ad01d0
> Fixes: 1758af47b98c1 ("net: phy: intel-xway: add support for PHY LEDs")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>
> [...]
Here is the summary with links:
- [net,v2] net: phy: intel-xway: fix OF node refcount leakage
https://git.kernel.org/netdev/net/c/79912b256e14
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-21 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19 0:41 [PATCH net v2] net: phy: intel-xway: fix OF node refcount leakage Daniel Golle
2026-01-21 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox