power: supply: adp5061: Fix a couple off by ones
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Jul 2018 07:58:13 +0000 (10:58 +0300)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Wed, 11 Jul 2018 10:00:24 +0000 (12:00 +0200)
commit89b135ba1b73cd54a09283b39420c90538283801
tree12bf6bd0072c583b35ebb46a5c336985da670fd2
parent7914c67667a06d7b5dbc297dfff49285b9c3a0d4
power: supply: adp5061: Fix a couple off by ones

We end up reading one element beyond the end of the adp5061_vmax[] array
here.

Fixes: fe8e81b7e899 ("adp5061: New driver for ADP5061 I2C battery charger")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/adp5061.c