[PATCH 0/2] leds: lp50xx: Fix component index and count validation

From: Tobias Johansson

Date: Fri Nov 27 2026 - 08:44:44 EST


This series fixes two pre-existing bounds-check issues identified during
review of the default-intensity patch:
https://lore.kernel.org/r/20261109-b4-leds-lp50xx-default-intensity-v1-1-0a04a3533df6@xxxxxxxx

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.

Both issues require malformed firmware descriptions. The fixes are kept
separate from the default-intensity feature and do not depend on it.
Each patch includes a Fixes tag for independent backporting.

---
Tobias Johansson (2):
leds: lp50xx: Use an unsigned component index
leds: lp50xx: Reject excessive component counts

drivers/leds/leds-lp50xx.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
base-commit: 05b4738b0078f7d6f154f68068a11c8a0635e9df
change-id: 20261119-leds-lp50xx-bounds-fixes-b40666d382f6

Best regards,
--
Tobias Johansson <tobias.johansson@xxxxxxxx>