Skip to content

Commit 04499f2

Browse files
Lu HongfeiPaolo Abeni
authored andcommitted
net: dsa: Removed unneeded of_node_put in felix_parse_ports_node
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> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Fixes: de879a0 ("net: dsa: felix: add functionality when not all ports are supported") Link: https://lore.kernel.org/r/20230710031859.36784-1-luhongfei@vivo.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent c0dbbdf commit 04499f2

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/net/dsa/ocelot/felix.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,6 @@ static int felix_parse_ports_node(struct felix *felix,
12861286
if (err < 0) {
12871287
dev_info(dev, "Unsupported PHY mode %s on port %d\n",
12881288
phy_modes(phy_mode), port);
1289-
of_node_put(child);
12901289

12911290
/* Leave port_phy_modes[port] = 0, which is also
12921291
* PHY_INTERFACE_MODE_NA. This will perform a

0 commit comments

Comments
 (0)