OpenCloudOS-Kernel/drivers/net/ethernet/ti
Nishka Dasgupta 3cd6e20f54 net: ethernet: ti: cpsw: Add of_node_put() before return and break
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a return or break from the middle of the loop,
there is no put, thus causing a memory leak.
Hence, for function cpsw_probe_dt, create an extra label err_node_put
that puts the last used node and returns ret; modify the return
statements in the loop to save the return value in ret and goto this new
label.
For function cpsw_remove_dt, add an of_node_put before the break.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-16 12:37:30 -07:00
..
Kconfig net: ethernet: ti: cpsw: add XDP support 2019-07-08 14:58:04 -07:00
Makefile net: ethernet: ti: netcp_ethss: fix build 2019-05-13 09:56:05 -07:00
cpmac.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
cpsw-common.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
cpsw-phy-sel.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
cpsw.c net: ethernet: ti: cpsw: Add of_node_put() before return and break 2019-07-16 12:37:30 -07:00
cpsw.h net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
cpsw_ale.c net: ethernet: ti: ale: do not auto delete mcast super entries 2019-04-27 17:11:49 -04:00
cpsw_ale.h net: ethernet: ti: cpsw: fix allmulti cfg in dual_mac mode 2019-04-27 17:11:49 -04:00
cpsw_ethtool.c net: ethernet: ti: cpsw: add XDP support 2019-07-08 14:58:04 -07:00
cpsw_priv.c net: ethernet: ti: cpsw: switch to use mac sl api 2019-04-27 17:11:49 -04:00
cpsw_priv.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
cpsw_sl.c net: ethernet: ti: cpsw: introduce mac sl module api 2019-04-27 17:11:49 -04:00
cpsw_sl.h net: ethernet: ti: cpsw: introduce mac sl module api 2019-04-27 17:11:49 -04:00
cpts.c net: ethernet: ti: cpts: add support for ext rftclk selection 2019-06-09 12:53:06 -07:00
cpts.h net: ethernet: ti: cpts: add support for ext rftclk selection 2019-06-09 12:53:06 -07:00
davinci_cpdma.c davinci_cpdma: don't cast dma_addr_t to pointer 2019-07-12 15:19:37 -07:00
davinci_cpdma.h net: ethernet: ti: davinci_cpdma: allow desc split while down 2019-07-08 14:58:04 -07:00
davinci_emac.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
davinci_mdio.c drivers: net: davinci_mdio: fix return value check in davinci_mdio_probe() 2019-05-05 10:17:28 -07:00
netcp.h net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
netcp_core.c net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
netcp_ethss.c net: ethernet: ti: netcp_ethss: add support for child cpts node 2019-06-09 12:53:06 -07:00
netcp_sgmii.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
netcp_xgbepcsr.c net: ethernet: ti: convert to SPDX license identifiers 2019-04-27 17:11:48 -04:00
tlan.c ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
tlan.h tlan: Don't scream if no link 2014-07-07 17:06:52 -07:00