* [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node
@ 2023-07-10 3:18 Lu Hongfei
2023-07-10 10:58 ` Vladimir Oltean
2023-07-11 9:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Lu Hongfei @ 2023-07-10 3:18 UTC (permalink / raw)
To: Vladimir Oltean, Claudiu Manoil, Alexandre Belloni,
UNGLinuxDriver, Andrew Lunn, Florian Fainelli, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: opensource.kernel, luhongfei
Remove unnecessary of_node_put from the continue path to prevent
child node from being released twice, which could avoid resource
leak or other unexpected issues.
Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
---
drivers/net/dsa/ocelot/felix.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index dee43caee19e..8da46d284e35 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1286,7 +1286,6 @@ static int felix_parse_ports_node(struct felix *felix,
if (err < 0) {
dev_info(dev, "Unsupported PHY mode %s on port %d\n",
phy_modes(phy_mode), port);
- of_node_put(child);
/* Leave port_phy_modes[port] = 0, which is also
* PHY_INTERFACE_MODE_NA. This will perform a
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node
2023-07-10 3:18 [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node Lu Hongfei
@ 2023-07-10 10:58 ` Vladimir Oltean
2023-07-11 9:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Oltean @ 2023-07-10 10:58 UTC (permalink / raw)
To: Lu Hongfei
Cc: Claudiu Manoil, Alexandre Belloni, UNGLinuxDriver, Andrew Lunn,
Florian Fainelli, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-kernel, opensource.kernel
On Mon, Jul 10, 2023 at 11:18:59AM +0800, Lu Hongfei wrote:
> Remove unnecessary of_node_put from the continue path to prevent
> child node from being released twice, which could avoid resource
> leak or other unexpected issues.
>
> Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
> ---
> drivers/net/dsa/ocelot/felix.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
> index dee43caee19e..8da46d284e35 100644
> --- a/drivers/net/dsa/ocelot/felix.c
> +++ b/drivers/net/dsa/ocelot/felix.c
> @@ -1286,7 +1286,6 @@ static int felix_parse_ports_node(struct felix *felix,
> if (err < 0) {
> dev_info(dev, "Unsupported PHY mode %s on port %d\n",
> phy_modes(phy_mode), port);
> - of_node_put(child);
>
> /* Leave port_phy_modes[port] = 0, which is also
> * PHY_INTERFACE_MODE_NA. This will perform a
> --
> 2.39.0
>
Fixes: de879a016a94 ("net: dsa: felix: add functionality when not all ports are supported")
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node
2023-07-10 3:18 [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node Lu Hongfei
2023-07-10 10:58 ` Vladimir Oltean
@ 2023-07-11 9:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-11 9:00 UTC (permalink / raw)
To: Lu Hongfei
Cc: vladimir.oltean, claudiu.manoil, alexandre.belloni,
UNGLinuxDriver, andrew, f.fainelli, davem, edumazet, kuba, pabeni,
netdev, linux-kernel, opensource.kernel
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 10 Jul 2023 11:18:59 +0800 you wrote:
> Remove unnecessary of_node_put from the continue path to prevent
> child node from being released twice, which could avoid resource
> leak or other unexpected issues.
>
> Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
> ---
> drivers/net/dsa/ocelot/felix.c | 1 -
> 1 file changed, 1 deletion(-)
Here is the summary with links:
- net: dsa: Removed unneeded of_node_put in felix_parse_ports_node
https://git.kernel.org/netdev/net/c/04499f28b40b
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] 3+ messages in thread
end of thread, other threads:[~2023-07-11 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10 3:18 [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node Lu Hongfei
2023-07-10 10:58 ` Vladimir Oltean
2023-07-11 9:00 ` 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