From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Lu Hongfei <luhongfei@vivo.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
opensource.kernel@vivo.com
Subject: Re: [PATCH] net: dsa: Removed unneeded of_node_put in felix_parse_ports_node
Date: Mon, 10 Jul 2023 13:58:35 +0300 [thread overview]
Message-ID: <20230710105835.4e4pv7nxbatx7ygq@skbuf> (raw)
In-Reply-To: <20230710031859.36784-1-luhongfei@vivo.com>
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>
next prev parent reply other threads:[~2023-07-10 10:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-07-11 9:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230710105835.4e4pv7nxbatx7ygq@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luhongfei@vivo.com \
--cc=netdev@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox