Commit 374283a1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jakub Kicinski

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: dab2b265 ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarRoger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/e3012f0c-1621-40e6-bf7d-03c276f6e07f@kili.mountainSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fbf6f482
...@@ -2068,7 +2068,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common) ...@@ -2068,7 +2068,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
/* Initialize the Serdes PHY for the port */ /* Initialize the Serdes PHY for the port */
ret = am65_cpsw_init_serdes_phy(dev, port_np, port); ret = am65_cpsw_init_serdes_phy(dev, port_np, port);
if (ret) if (ret)
return ret; goto of_node_put;
port->slave.mac_only = port->slave.mac_only =
of_property_read_bool(port_np, "ti,mac-only"); of_property_read_bool(port_np, "ti,mac-only");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment