]> Git Repo - linux.git/commit
net: phy: Manual remove LEDs to ensure correct ordering
authorAndrew Lunn <[email protected]>
Sat, 17 Jun 2023 15:55:00 +0000 (17:55 +0200)
committerDavid S. Miller <[email protected]>
Sun, 18 Jun 2023 16:33:05 +0000 (17:33 +0100)
commitc938ab4da0eb1620ae3243b0b24c572ddfc318fc
treea6982b5b06fb0a12a1a7e1a71c937004aac974d8
parenteb09fc2d14163c0c217846cfabec3d0cce7c8f8c
net: phy: Manual remove LEDs to ensure correct ordering

If the core is left to remove the LEDs via devm_, it is performed too
late, after the PHY driver is removed from the PHY. This results in
dereferencing a NULL pointer when the LED core tries to turn the LED
off before destroying the LED.

Manually unregister the LEDs at a safe point in phy_remove.

Cc: [email protected]
Reported-by: Florian Fainelli <[email protected]>
Suggested-by: Florian Fainelli <[email protected]>
Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs")
Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/phy/phy_device.c
This page took 0.048535 seconds and 4 git commands to generate.