mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
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:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| spl2sw_define.h | ||
| spl2sw_desc.c | ||
| spl2sw_desc.h | ||
| spl2sw_driver.c | ||
| spl2sw_int.c | ||
| spl2sw_int.h | ||
| spl2sw_mac.c | ||
| spl2sw_mac.h | ||
| spl2sw_mdio.c | ||
| spl2sw_mdio.h | ||
| spl2sw_phy.c | ||
| spl2sw_phy.h | ||
| spl2sw_register.h | ||