commit | 98d278ca00bd8f62c8bc98bd9e65372d16eb6956 | [log] [tgz] |
---|---|---|
author | Gabriel David <ultracoolguy@tutanota.com> | Fri Oct 02 18:27:00 2020 -0400 |
committer | Pavel Machek <pavel@ucw.cz> | Mon Oct 05 20:36:09 2020 +0200 |
tree | e4928fce367f64d4143689b2a10190b331a14022 | |
parent | 8fd8f94235c2c925d80b2316e0ab2bdd00af9bae [diff] |
leds: lm3697: Fix out-of-bound access If both LED banks aren't used in device tree, an out-of-bounds condition in lm3697_init occurs because of the for loop assuming that all the banks are used. Fix it by adding a variable that contains the number of used banks. Signed-off-by: Gabriel David <ultracoolguy@tutanota.com> [removed extra rename, minor tweaks] Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: stable@kernel.org