]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ti: icssm-prueth: fix eth_ports_node leak in probe
authorShitalkumar Gandhi <shital.gandhi45@gmail.com>
Wed, 6 May 2026 19:58:13 +0000 (01:28 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 9 May 2026 01:10:30 +0000 (18:10 -0700)
commit6635fa84403c3a59455b66007c019a7cc632db30
tree7a189793e0192b39dc1fbd122d87cfe9538e7601
parentc4f3d6eb1fcf6cd9ce4644f604d5aad1ce594dfc
net: ti: icssm-prueth: fix eth_ports_node leak in probe

The error path on of_property_read_u32() failure inside
icssm_prueth_probe() returns without putting eth_ports_node,
which was acquired before the for_each_child_of_node() loop.

Drop it before returning.

Fixes: 511f6c1ae093 ("net: ti: icssm-prueth: Adds ICSSM Ethernet driver")
Signed-off-by: Shitalkumar Gandhi <shitalkumar.gandhi@cambiumnetworks.com>
Link: https://patch.msgid.link/20260506195813.641610-1-shitalkumar.gandhi@cambiumnetworks.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/icssm/icssm_prueth.c