Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180529
b: refs/heads/master
c: 62737d4
h: refs/heads/master
i:
  180527: 1f16342
v: v3
  • Loading branch information
Roel Kluin authored and Liam Girdwood committed Feb 12, 2010
1 parent eb6826b commit d95bd4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 973e9a2795b3b41d8408a0bb6f87b783c5efc88a
refs/heads/master: 62737d445b149eaf0beac50de8d856b5e94150be
4 changes: 2 additions & 2 deletions trunk/drivers/regulator/lp3971.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev,
if (vol_map[val] >= min_vol)
break;

if (vol_map[val] > max_vol)
if (val > LDO_VOL_MAX_IDX || vol_map[val] > max_vol)
return -EINVAL;

return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo),
Expand Down Expand Up @@ -272,7 +272,7 @@ static int lp3971_dcdc_set_voltage(struct regulator_dev *dev,
if (vol_map[val] >= min_vol)
break;

if (vol_map[val] > max_vol)
if (val > BUCK_TARGET_VOL_MAX_IDX || vol_map[val] > max_vol)
return -EINVAL;

ret = lp3971_set_bits(lp3971, LP3971_BUCK_TARGET_VOL1_REG(buck),
Expand Down

0 comments on commit d95bd4a

Please sign in to comment.