diff options
| author | Manuel Fombuena <[email protected]> | 2025-02-25 22:01:02 +0000 |
|---|---|---|
| committer | Lee Jones <[email protected]> | 2025-02-28 09:18:37 +0000 |
| commit | c72e455b89f216b43cd0dbb518036ec4c98f5c46 (patch) | |
| tree | c9cdbe1ac25ce2352b58d76714fb816eaa6bb38c /drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | |
| parent | Linux 6.14-rc1 (diff) | |
| download | kernel-c72e455b89f216b43cd0dbb518036ec4c98f5c46.tar.gz kernel-c72e455b89f216b43cd0dbb518036ec4c98f5c46.zip | |
leds: leds-st1202: Fix NULL pointer access on race condition
st1202_dt_init() calls devm_led_classdev_register_ext() before the
internal data structures are properly set up, so the LEDs become visible
to user space while being partially initialized, leading to a window
where trying to access them causes a NULL pointer access.
Move devm_led_classdev_register_ext() from DT initialization
to the end of the probe function when DT and hardware are fully
initialized and ready to interact with user space.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <[email protected]>
Link: https://lore.kernel.org/r/CWLP123MB54732771AC0CE5491B3C84DCC5C32@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM
Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c')
0 files changed, 0 insertions, 0 deletions
