-
由 Geert Uytterhoeven 提交于
If device_release_driver(&phydev->mdio.dev) is called, it releases all resources belonging to the PHY device. Hence the subsequent call to phy_led_triggers_unregister() will access already freed memory when unregistering the LEDs. Move the call to phy_led_triggers_unregister() before the possible call to device_release_driver() to fix this. Fixes: 2e0bc452 ("net: phy: leds: add support for led triggers on phy link state change") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Tested-by: NZach Brown <zach.brown@ni.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
0075bd69