summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-09-04 17:10:48 +0200
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-09-05 12:15:52 +0200
commitd06563cb860ab594889010889a7111c9e25d1051 (patch)
treede5486bc44497e7cd8833d3a4d7c14449fef687b /README
parentregulator: isl6271a-regulator - fix regulator_desc parameter for regulator_re... (diff)
downloadlinux-d06563cb860ab594889010889a7111c9e25d1051.tar.xz
linux-d06563cb860ab594889010889a7111c9e25d1051.zip
regulator: 88pm8607 - fix value range checking for accessing info->vol_table
In choose_voltage(), we use i as array index of info->vol_table. The valid value range for i should be 0 .. ARRAY_SIZE(info->vol_table) - 1. Take LDO1 as example, ARRAY_SIZE(LDO1_table) is 4, vol_nbits of LDO1 is 2. for (i = 0; i < (2 << info->vol_nbits); i++) is equivalent to for (i = 0; i < 8; i++) which is wrong. The same value range checking also applies for index in pm8607_list_voltage(). 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>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions