Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262155
b: refs/heads/master
c: 89f425e
h: refs/heads/master
i:
  262153: 724db5d
  262151: 3268a51
v: v3
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Jul 22, 2011
1 parent a1b5d39 commit 61daf58
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 39aa9b6e3cb1b2a564d3422eedb7f725179162d3
refs/heads/master: 89f425ed5bf3d4fd97e840296dccd75b8e0fe4c9
11 changes: 9 additions & 2 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ static int regulator_check_voltage(struct regulator_dev *rdev,
if (*min_uV < rdev->constraints->min_uV)
*min_uV = rdev->constraints->min_uV;

if (*min_uV > *max_uV)
if (*min_uV > *max_uV) {
rdev_err(rdev, "unsupportable voltage range: %d-%duV\n",
min_uV, max_uV);
return -EINVAL;
}

return 0;
}
Expand Down Expand Up @@ -205,8 +208,11 @@ static int regulator_check_current_limit(struct regulator_dev *rdev,
if (*min_uA < rdev->constraints->min_uA)
*min_uA = rdev->constraints->min_uA;

if (*min_uA > *max_uA)
if (*min_uA > *max_uA) {
rdev_err(rdev, "unsupportable current range: %d-%duA\n",
min_uA, max_uA);
return -EINVAL;
}

return 0;
}
Expand All @@ -221,6 +227,7 @@ static int regulator_mode_constrain(struct regulator_dev *rdev, int *mode)
case REGULATOR_MODE_STANDBY:
break;
default:
rdev_err(rdev, "invalid mode %x specified\n", *mode);
return -EINVAL;
}

Expand Down

0 comments on commit 61daf58

Please sign in to comment.