Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350433
b: refs/heads/master
c: eb758de
h: refs/heads/master
i:
  350431: 18a5348
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 10, 2013
1 parent 8ea1a7d commit 528102e
Show file tree
Hide file tree
Showing 2 changed files with 5 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: b9bb09111a4f5dbf8a0bd7df77ec79d3fdf9e5d2
refs/heads/master: eb758de6a00f2c1f5694efc503b94d162db99734
5 changes: 4 additions & 1 deletion trunk/drivers/regulator/lp8788-buck.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static int lp8788_init_dvs(struct platform_device *pdev,
u8 default_dvs_mode[] = { LP8788_BUCK1_DVS_I2C, LP8788_BUCK2_DVS_I2C };

/* no dvs for buck3, 4 */
if (id == BUCK3 || id == BUCK4)
if (id > BUCK2)
return 0;

/* no dvs platform data, then dvs will be selected by I2C registers */
Expand Down Expand Up @@ -505,6 +505,9 @@ static int lp8788_buck_probe(struct platform_device *pdev)
struct regulator_dev *rdev;
int ret;

if (id >= LP8788_NUM_BUCKS)
return -EINVAL;

buck = devm_kzalloc(&pdev->dev, sizeof(struct lp8788_buck), GFP_KERNEL);
if (!buck)
return -ENOMEM;
Expand Down

0 comments on commit 528102e

Please sign in to comment.