[PATCH v2 net 0/4] net: ti: icssg: Fix device_node handling in prueth_probe()

From: Xiangwu Lai

Date: Tue Nov 10 2026 - 02:01:17 EST


Hello,

This series fixes the device_node handling in prueth_probe() of both
ICSSG drivers.

Patches 1 and 2, carried over from v1 unchanged, fix a device_node
refcount leak on the "ti,mii-g-rt" and "ti,mii-rt" syscon lookup
failure paths. Patches 3 and 4 fix the port scan loop that is shared
by both drivers: a port whose reg property cannot be read is skipped
instead of being routed based on the uninitialized value, the node
reference is taken only for a port that is actually accepted so an
out-of-range reg value no longer leaks it, duplicate reg values are
rejected, which is what the existing "port0 and port1 can't have
same reg" check intended but never caught, and that unreachable
check is dropped.

Thanks to Simon Horman for the review of v1 [1][2] and for suggesting
to collect the fixes into one series.

Changes in v2:

- Collect the two independent fixes into one series (suggested by
Simon Horman).

- Add the port scan fixes for both drivers.

[1] https://lore.kernel.org/netdev/20261109165235.GR18859@xxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/netdev/20261109170036.GT18859@xxxxxxxxxxxxxxxx/

Xiangwu Lai (4):
net: ti: icssg-prueth: Fix device_node refcount leak in prueth_probe()
net: ti: icssg-prueth-sr1: Fix device_node refcount leak in
prueth_probe()
net: ti: icssg-prueth: Fix port scan issues in prueth_probe()
net: ti: icssg-prueth-sr1: Fix port scan issues in prueth_probe()

drivers/net/ethernet/ti/icssg/icssg_prueth.c | 32 +++++++++++--------
.../net/ethernet/ti/icssg/icssg_prueth_sr1.c | 32 +++++++++++--------
2 files changed, 38 insertions(+), 26 deletions(-)

--
2.50.1.windows.1