summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/pv88060-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-03-03 23:49:46 +0000
committerMark Brown <broonie@kernel.org>2019-03-03 23:49:46 +0000
commit1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9 (patch)
tree6d98b9475d43d035f597c4139fdd7587b46fae8e /drivers/regulator/pv88060-regulator.c
parent6c98ac2a347f4849885bd9f966bda50fc25f8d55 (diff)
parentc25d47888f0fb3d836d68322d4aea2caf31a75a6 (diff)
downloadlinux-1aad9f2f79e0e09f3ecdf6787df6021ab3941ce9.tar.bz2
Merge branch 'for-5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.1
Diffstat (limited to 'drivers/regulator/pv88060-regulator.c')
-rw-r--r--drivers/regulator/pv88060-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/regulator/pv88060-regulator.c
index d5dab9bef378..da6ed723e398 100644
--- a/drivers/regulator/pv88060-regulator.c
+++ b/drivers/regulator/pv88060-regulator.c
@@ -135,7 +135,7 @@ static int pv88060_set_current_limit(struct regulator_dev *rdev, int min,
int i;
/* search for closest to maximum */
- for (i = info->n_current_limits; i >= 0; i--) {
+ for (i = info->n_current_limits - 1; i >= 0; i--) {
if (min <= info->current_limits[i]
&& max >= info->current_limits[i]) {
return regmap_update_bits(rdev->regmap,