Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: dab2b265dd23 ("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>

authored by

Dan Carpenter and committed by
Jakub Kicinski
374283a1 fbf6f482

+1 -1
+1 -1
drivers/net/ethernet/ti/am65-cpsw-nuss.c
··· 2068 2068 /* Initialize the Serdes PHY for the port */ 2069 2069 ret = am65_cpsw_init_serdes_phy(dev, port_np, port); 2070 2070 if (ret) 2071 - return ret; 2071 + goto of_node_put; 2072 2072 2073 2073 port->slave.mac_only = 2074 2074 of_property_read_bool(port_np, "ti,mac-only");