Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210720
b: refs/heads/master
c: 11fa0d1
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Sep 1, 2010
1 parent 996a30e commit c2201ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 7112b2dfea4966c58d21b7197c3f099041248e59
refs/heads/master: 11fa0d1d20c7cc432c77369bc8bbfbc21030e457
6 changes: 3 additions & 3 deletions trunk/drivers/regulator/max8998.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev)
if (!max8998)
return -ENOMEM;

size = sizeof(struct regulator_dev *) * (pdata->num_regulators + 1);
size = sizeof(struct regulator_dev *) * pdata->num_regulators;
max8998->rdev = kzalloc(size, GFP_KERNEL);
if (!max8998->rdev) {
kfree(max8998);
Expand Down Expand Up @@ -583,7 +583,7 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev)

return 0;
err:
for (i = 0; i <= max8998->num_regulators; i++)
for (i = 0; i < max8998->num_regulators; i++)
if (rdev[i])
regulator_unregister(rdev[i]);

Expand All @@ -599,7 +599,7 @@ static int __devexit max8998_pmic_remove(struct platform_device *pdev)
struct regulator_dev **rdev = max8998->rdev;
int i;

for (i = 0; i <= max8998->num_regulators; i++)
for (i = 0; i < max8998->num_regulators; i++)
if (rdev[i])
regulator_unregister(rdev[i]);

Expand Down

0 comments on commit c2201ed

Please sign in to comment.