]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/leds/leds-mc13783.c: fix off-by-one for checking num_leds
authorAxel Lin <axel.lin@gmail.com>
Tue, 10 Jan 2012 23:09:43 +0000 (15:09 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Jan 2012 00:30:49 +0000 (16:30 -0800)
commit23db6286eabb7a6e85ed121e6070dbfdc8a98037
treec901525cf47e02e4423800d13bc7802755e566cd
parentd22cf77b3b22f2c334f18694d57a1272635ebd09
drivers/leds/leds-mc13783.c: fix off-by-one for checking num_leds

The LED id begins from 0.  Thus the maximum number of leds should be
MC13783_LED_MAX + 1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Philippe Retornaz <philippe.retornaz@epfl.ch>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/leds/leds-mc13783.c