diff options
author | Manuel Fombuena <fombuena@outlook.com> | 2025-02-26 01:01:02 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2025-02-28 12:18:37 +0300 |
commit | c72e455b89f216b43cd0dbb518036ec4c98f5c46 (patch) | |
tree | c9cdbe1ac25ce2352b58d76714fb816eaa6bb38c /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
parent | 2014c95afecee3e76ca4a56956a936e23283f05b (diff) | |
download | linux-c72e455b89f216b43cd0dbb518036ec4c98f5c46.tar.xz |
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 <fombuena@outlook.com>
Link: https://lore.kernel.org/r/CWLP123MB54732771AC0CE5491B3C84DCC5C32@CWLP123MB5473.GBRP123.PROD.OUTLOOK.COM
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions