kernel_samsung_a53x/drivers/leds
Michal Vokáč 619326a8df leds: lp55xx: Remove redundant test for invalid channel number
commit 09b1ef9813a0742674f7efe26104403ca94a1b4a upstream.

Since commit 92a81562e695 ("leds: lp55xx: Add multicolor framework
support to lp55xx") there are two subsequent tests if the chan_nr
(reg property) is in valid range. One in the lp55xx_init_led()
function and one in the lp55xx_parse_common_child() function that
was added with the mentioned commit.

There are two issues with that.

First is in the lp55xx_parse_common_child() function where the reg
property is tested right after it is read from the device tree.
Test for the upper range is not correct though. Valid reg values are
0 to (max_channel - 1) so it should be >=.

Second issue is that in case the parsed value is out of the range
the probe just fails and no error message is shown as the code never
reaches the second test that prints and error message.

Remove the test form lp55xx_parse_common_child() function completely
and keep the one in lp55xx_init_led() function to deal with it.

Fixes: 92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx")
Cc: stable@vger.kernel.org
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Link: https://lore.kernel.org/r/20241017150812.3563629-1-michal.vokac@ysoft.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
..
trigger leds: trigger: panic: Don't register panic notifier if creating the trigger failed 2024-11-18 12:13:19 +01:00
Kconfig leds: aw2013: Select missing dependency REGMAP_I2C 2024-11-18 12:12:48 +01:00
led-class-flash.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led-class-multicolor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led-class.c Revert "leds: led-core: Fix refcount leak in of_led_get()" 2024-11-23 23:20:09 +01:00
led-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
led-triggers.c leds: trigger: Unregister sysfs attributes before calling deactivate() 2024-11-23 23:20:09 +01:00
leds-88pm860x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-aat1290.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-acer-a500.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-adp5520.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-an30259a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-apu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ariel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-as3645a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-asic3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-aw2013.c leds: aw2013: Unlock mutex before destroying it 2024-11-19 08:44:55 +01:00
leds-bcm6328.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-bcm6358.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-bd2802.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-blinkm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-clevo-mail.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-cobalt-qube.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-cobalt-raq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-cpcap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-cr0014114.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-da903x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-da9052.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-dac124s085.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-el15203000.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-fsg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-gpio-register.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-hp6xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ip30.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ipaq-micro.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-is31fl32xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-is31fl319x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ktd2692.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm355x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3530.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3532.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3533.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3601x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3642.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3692x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm3697.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lm36274.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-locomo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp50xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp55xx-common.c leds: lp55xx: Remove redundant test for invalid channel number 2024-12-17 13:20:50 +01:00
leds-lp55xx-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp3944.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp3952.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp5521.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp5523.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp5562.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp8501.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp8788.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lp8860.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-lt3593.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-max8997.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-max77650.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-max77693.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-mc13783.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-menf21bmc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-mlxcpld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-mlxreg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-mt6323.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-net48xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-netxbig.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-nic78bx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ns2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ot200.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-pca955x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-pca963x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-pca9532.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-pm8058.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-powernv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-pwm.c leds: pwm: Don't disable the PWM when the LED should be off 2024-11-18 11:43:05 +01:00
leds-rb532.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-regulator.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-s2mf301.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-s2mpb02.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-s2mu106.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-s3c24xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-sc27xx-bltc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-sgm3140.c leds: sgm3140: Add missing timer cleanup and flash gpio control 2024-11-19 08:44:56 +01:00
leds-sm5714-fled.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-spi-byte.c Revert "leds: spi-byte: Call of_node_put() on error path" 2024-11-24 00:23:43 +01:00
leds-ss4200.c leds: ss4200: Convert PCIBIOS_* return codes to errnos 2024-11-23 23:20:13 +01:00
leds-sunfire.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-syscon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-tca6507.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-ti-lmu-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-tlc591xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-tps6105x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-turris-omnia.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-wm831x-status.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-wm8350.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds-wrap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
TODO Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uleds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00