diff options
| author | Shitalkumar Gandhi <shital.gandhi45@gmail.com> | 2026-06-23 12:11:42 +0530 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-24 19:34:56 -0700 |
| commit | a9e29dcd8a84081177f693439d663ca9e216c9fa (patch) | |
| tree | 7ccc8e943644e89f419238deefa039369cf703bd /scripts | |
| parent | 636838ebb74aa10b2195b60232ba3f49ff04d4f8 (diff) | |
net: ethernet: sunplus: spl2sw: fix phy_node refcount leak in remove
mac->phy_node is acquired via of_parse_phandle() in spl2sw_probe() and
stored in the mac private data, transferring ownership of the
device_node reference to mac. On driver removal, spl2sw_phy_remove()
disconnects the PHY but never drops that reference, so each
probe-then-remove cycle leaks one of_node refcount per port permanently.
Drop the reference after phy_disconnect(). While at it, remove the
redundant inner "if (ndev)" check; comm->ndev[i] was just verified
non-NULL on the line above.
Compile-tested only; no SP7021 hardware available.
Fixes: fd3040b9394c ("net: ethernet: Add driver for Sunplus SP7021")
Signed-off-by: Shitalkumar Gandhi <shitalkumar.gandhi@cambiumnetworks.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/f3bdd4c91f3e2269b4e256075f9dc70808b1b8e9.1782195965.git.shitalkumar.gandhi@cambiumnetworks.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
