Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140259
b: refs/heads/master
c: 3e2b9ab
h: refs/heads/master
i:
  140257: 14a91f3
  140255: 2f53ad9
v: v3
  • Loading branch information
Mark Brown authored and Liam Girdwood committed Mar 31, 2009
1 parent ea34edc commit b1b51d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 216765d92acaeabdad6561254a5a676325105a37
refs/heads/master: 3e2b9abda554e9f6105996dca77cca9ef98de17a
6 changes: 5 additions & 1 deletion trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,12 @@ static int set_machine_constraints(struct regulator_dev *rdev,
cmax = INT_MAX;
}

/* voltage constraints are optional */
if ((cmin == 0) && (cmax == 0))
goto out;

/* else require explicit machine-level constraints */
else if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
pr_err("%s: %s '%s' voltage constraints\n",
__func__, "invalid", name);
ret = -EINVAL;
Expand Down

0 comments on commit b1b51d1

Please sign in to comment.