Re: [PATCH] net: ethernet: sunplus: spl2sw: fix OF node leak in spl2sw_probe()
From: zhaofeng2
Date: Sun Nov 29 2026 - 23:40:37 EST
From: Zhao Feng <zhaofeng2@xxxxxxxxxxxxxxxxxxxx>
Hi,
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection).
The issue was found by code inspection: an OF reference-counting
audit of spl2sw_probe(). of_get_child_by_name() returns the
"ethernet-ports" node with an elevated reference count, and the
probe path never drops it. It was not observed at runtime.
> - What hardware the change was tested on.
The change was not tested on real hardware - I do not have Sunplus
SP7021 hardware. The patch only adds the missing of_node_put()
calls; it was verified against current upstream master.
Thanks,
Zhao Feng