Re: [PATCH] max8998: fix off-by-one value range checking

From: Axel Lin
Date: Wed Aug 04 2010 - 21:44:27 EST

2010/8/4 Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:
> On Wed, Aug 04, 2010 at 02:34:10PM +0800, Axel Lin wrote:
>> 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@xxxxxxxxx>
> Acked-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> Axel, please do try to bear in mind my previous comments about supplying
> subject lines for your commits consistent with those for the relevant
> code area.  This makes your patches easier to apply.
OK, will improve it next time.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at