Skip to content
Commit 98d278ca authored by Gabriel David's avatar Gabriel David Committed by Pavel Machek
Browse files

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: default avatarGabriel David <ultracoolguy@tutanota.com>
[removed extra rename, minor tweaks]
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
Cc: stable@kernel.org
parent 8fd8f942
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment