net: ti: icssm-prueth: Retain port node references until remove
Subsystems (3)
PATCH 1/1 net: ti: icssm-prueth: Retain port node references until remove
icssm_prueth_probe() takes a reference to each available port node and stores the nodes in prueth->eth_node[]. Those references are released both at the end of a successful probe and in icssm_prueth_remove(), leaving one excess put per port after unbinding the driver.
Keep the references after a successful probe, since the stored nodes are used during teardown. The existing remove path and probe error path then each release the references only when they own them.
---
AI assistance was used for analysis and patch preparation.
Based on next-20261104 (8b7179210b22).
Compile-tested: arm64, GCC 14.2.0, W=1, drivers/net/ethernet/ti/icssm/icssm_prueth.o; baseline and patched objects built with no warnings.
Static source review; no hardware, boot, or KASAN test was performed.
drivers/net/ethernet/ti/icssm/icssm_prueth.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ethernet/ti/icssm/icssm_prueth.c +0 -4
@@ -2018,10 +2018,6 @@ static int icssm_prueth_probe(struct platform_device *pdev)dev_info (dev,"TI PRU ethernet driver initialized: %s EMAC mode\n" , (!eth0_node || !eth1_node) ?"single" :"dual" ); -if (eth1_node) -of_node_put (eth1_node); -if (eth0_node) -of_node_put (eth0_node);return 0 ; netdev_unregister:
base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4