max8998: fix off-by-one value range checking
authorAxel Lin <axel.lin@gmail.com>
Wed, 4 Aug 2010 06:34:10 +0000 (14:34 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 11 Aug 2010 10:38:02 +0000 (11:38 +0100)
commit1b69d8e3fde65ab2b7c5e1d4adee59e8a67b0b4f
tree3cde765db7444f0c3d2964f4b6a6a7b3ad08c743
parent4cc2e3934bd74afbdff595ad2183e8aa25d0a0f2
max8998: fix off-by-one value range checking

In max8998_list_voltage() and max8998_set_voltage(),
we use ldo as array index of ldo_voltage_map.
Thus the valid range should be 0 .. ARRAY_SIZE(ldo_voltage_map)-1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/max8998.c
This page took 0.02574 seconds and 5 git commands to generate.