Commit ae7370e
net: usb: lan78xx: Fix memory leak on device unplug by freeing PHY device
Add calls to `phy_device_free` after `fixed_phy_unregister` to fix a
memory leak that occurs when the device is unplugged. This ensures
proper cleanup of pseudo fixed-link PHYs.
Fixes: 89b36fb ("lan78xx: Lan7801 Support for Fixed PHY")
Cc: Raghuram Chary J <raghuramchary.jallipalli@microchip.com>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20241116130558.1352230-2-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 03819ab commit ae7370e
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2380 | 2380 | | |
2381 | 2381 | | |
2382 | 2382 | | |
| 2383 | + | |
2383 | 2384 | | |
2384 | 2385 | | |
2385 | 2386 | | |
| |||
4246 | 4247 | | |
4247 | 4248 | | |
4248 | 4249 | | |
4249 | | - | |
| 4250 | + | |
4250 | 4251 | | |
| 4252 | + | |
| 4253 | + | |
4251 | 4254 | | |
4252 | 4255 | | |
4253 | 4256 | | |
| |||
0 commit comments