Skip to content

Commit 374283a

Browse files
Dan Carpenterkuba-moo
authored andcommitted
net: ethernet: ti: am65-cpsw: Call of_node_put() on error path
This code returns directly but it should instead call of_node_put() to drop some reference counts. Fixes: dab2b26 ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/e3012f0c-1621-40e6-bf7d-03c276f6e07f@kili.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent fbf6f48 commit 374283a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/ti/am65-cpsw-nuss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
20682068
/* Initialize the Serdes PHY for the port */
20692069
ret = am65_cpsw_init_serdes_phy(dev, port_np, port);
20702070
if (ret)
2071-
return ret;
2071+
goto of_node_put;
20722072

20732073
port->slave.mac_only =
20742074
of_property_read_bool(port_np, "ti,mac-only");

0 commit comments

Comments
 (0)