]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/leds/leds-mc13783.c: fix off-by-one for checking num_leds
authorAxel Lin <axel.lin@gmail.com>
Fri, 16 Dec 2011 04:50:15 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Dec 2011 06:01:20 +0000 (17:01 +1100)
commit3f49624bb50708020df1ad2fa531adc4d741b956
tree291ec80affacd65854659de7e9d667dd7f6e6aea
parenteffea23cdc9e0323815a3694a0e553ba3067ee87
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>
drivers/leds/leds-mc13783.c