Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220542
b: refs/heads/master
c: da05738
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Oct 28, 2010
1 parent 407feb9 commit 307c299
Show file tree
Hide file tree
Showing 2 changed files with 9 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: f5ee10ab42c76f36eea1bd6f7a35da387635ebf9
refs/heads/master: da05738e94b644d759f28184a9f0bf875b271c55
10 changes: 8 additions & 2 deletions trunk/drivers/regulator/max8952.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client,
max8952->rdev = regulator_register(&regulator, max8952->dev,
&pdata->reg_data, max8952);

ret = IS_ERR(max8952->rdev);
if (ret)
if (IS_ERR(max8952->rdev)) {
ret = PTR_ERR(max8952->rdev);
dev_err(max8952->dev, "regulator init failed (%d)\n", ret);
goto err_reg;
}

max8952->en = !!(pdata->reg_data.constraints.boot_on);
max8952->vid0 = (pdata->default_mode % 2) == 1;
Expand Down Expand Up @@ -309,6 +311,10 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client,

i2c_set_clientdata(client, max8952);

return 0;

err_reg:
kfree(max8952);
return ret;
}

Expand Down

0 comments on commit 307c299

Please sign in to comment.