regulator: ab8500 - fix off-by-one value range checking for selector
authorAxel Lin <axel.lin@gmail.com>
Sat, 4 Sep 2010 15:06:41 +0000 (23:06 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Sun, 5 Sep 2010 10:15:52 +0000 (11:15 +0100)
commit49990e6efe576b8707584398f93198b5aa182ab7
treee2ad8126f0d930d314fb6f771c87ab4f96977924
parentd06563cb860ab594889010889a7111c9e25d1051
regulator: ab8500 - fix off-by-one value range checking for selector

selector is used as array index of info->supported_voltages
Thus the valid value range should be 0 .. info->voltages_len -1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@openource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/ab8500.c