summaryrefslogtreecommitdiffstats
path: root/MAINTAINERS
diff options
context:
space:
mode:
authorMaarten Zanders <maarten.zanders@mind.be>2022-10-28 12:56:43 +0200
committerPavel Machek <pavel@ucw.cz>2022-10-28 17:12:27 +0200
commit17c13c724b143c835fe3a9109daab524dff3d06f (patch)
tree9fb8e63338d2384b371251ad00c21fd9956e559c /MAINTAINERS
parent5f52a8ba7e91215c3d046d298fb328d1b9f7897d (diff)
downloadlinux-stable-17c13c724b143c835fe3a9109daab524dff3d06f.tar.gz
linux-stable-17c13c724b143c835fe3a9109daab524dff3d06f.tar.bz2
linux-stable-17c13c724b143c835fe3a9109daab524dff3d06f.zip
leds: lp5523: fix out-of-bounds bug in lp5523_selftest()
When not all LED channels of the led chip are configured, the sysfs selftest functionality gives erroneous results and tries to test all channels of the chip. There is a potential for LED overcurrent conditions since the test current will be set to values from out-of-bound regions. It is wrong to use pdata->led_config[i].led_current to skip absent channels as led_config[] only contains the configured LED channels. Instead of iterating over all the physical channels of the device, loop over the available LED configurations and use led->chan_nr to access the correct i2c registers. Keep the zero-check for the LED current as existing users might depend on this to disable a channel. Reported-by: Arne Staessen <a.staessen@televic.com> Signed-off-by: Maarten Zanders <maarten.zanders@mind.be> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions