]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
leds: leds-lp50xx: Allow LED 0 to be added to module bank
authorChristian Hitz <christian.hitz@bbv.ch>
Wed, 8 Oct 2025 12:32:21 +0000 (14:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:41 +0000 (10:14 +0100)
commit5b0ceb3ee343edddb59fe3bc3d99d0dd10e2e765
treee7429a2cd4a903954a5d216aeb5172439e89adb8
parentffdec4686eae47895f7d098325df8df2a608b93f
leds: leds-lp50xx: Allow LED 0 to be added to module bank

commit 26fe74d598c32e7bc6f150edfc4aa43e1bee55db upstream.

led_banks contains LED module number(s) that should be grouped into the
module bank. led_banks is 0-initialized.
By checking the led_banks entries for 0, un-set entries are detected.
But a 0-entry also indicates that LED module 0 should be grouped into the
module bank.

By only iterating over the available entries no check for unused entries
is required and LED module 0 can be added to bank.

Cc: stable@vger.kernel.org
Fixes: 242b81170fb8 ("leds: lp50xx: Add the LP50XX family of the RGB LED driver")
Signed-off-by: Christian Hitz <christian.hitz@bbv.ch>
Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Link: https://patch.msgid.link/20251008123222.1117331-1-christian@klarinett.li
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/leds/leds-lp50xx.c