[PATCH v2 0/3] leds: lp50xx: Fix component bounds checks and read default-intensity
From: Tobias Johansson
Date: Wed Dec 02 2026 - 08:51:51 EST
This series fixes two pre-existing bounds-check issues in the LP50xx
devicetree parsing path and adds support for reading the
default-intensity property for multicolor components.
The first patch makes the component index unsigned so that firmware reg
values with the high bit set cannot bypass the upper-bound check.
The second patch rejects more than three component child nodes, preventing
num_colors from exceeding the allocation used by the brightness and
multicolor sysfs paths even when component reg values are repeated.
The third patch reads the optional default-intensity property for each
component so configured RGB intensities are applied when brightness is
set, without requiring userspace to write multi_intensity first.
---
Changes in v2:
- Merged the two pre-existing bounds-check fixes into this series ahead of
the default-intensity patch as requested during review.
- Link to v1 (default-intensity): https://lore.kernel.org/r/20261109-b4-leds-lp50xx-default-intensity-v1-1-0a04a3533df6@xxxxxxxx
- Link to v1 (bounds-fixes): https://lore.kernel.org/r/20261127-leds-lp50xx-bounds-fixes-v1-0-b9f0399d747e@xxxxxxxx
---
Tobias Johansson (3):
leds: lp50xx: Use an unsigned component index
leds: lp50xx: Reject excessive component counts
leds: lp50xx: Read default intensity from devicetree
drivers/leds/leds-lp50xx.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
base-commit: 05b4738b0078f7d6f154f68068a11c8a0635e9df
change-id: 20260914-b4-leds-lp50xx-default-intensity-345d4cc702b4
Best regards,
--
Tobias Johansson <tobias.johansson@xxxxxxxx>