Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259648
b: refs/heads/master
c: f88af7e
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent 82245db commit f7d9dda
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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: 7959a7c477b5dd284bb424c9cfbf917ae1664272
refs/heads/master: f88af7e7d338e067eff0c2b9e317da97488ff74c
20 changes: 11 additions & 9 deletions trunk/drivers/staging/iio/adc/max1363_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,12 +1255,15 @@ static int __devinit max1363_probe(struct i2c_client *client,
struct regulator *reg;

reg = regulator_get(&client->dev, "vcc");
if (!IS_ERR(reg)) {
ret = regulator_enable(reg);
if (ret)
goto error_put_reg;
if (IS_ERR(reg)) {
ret = PTR_ERR(reg);
goto error_out;
}

ret = regulator_enable(reg);
if (ret)
goto error_put_reg;

indio_dev = iio_allocate_device(sizeof(struct max1363_state));
if (indio_dev == NULL) {
ret = -ENOMEM;
Expand Down Expand Up @@ -1323,6 +1326,7 @@ static int __devinit max1363_probe(struct i2c_client *client,
}

return 0;

error_uninit_ring:
iio_ring_buffer_unregister(indio_dev->ring);
error_cleanup_ring:
Expand All @@ -1335,12 +1339,10 @@ static int __devinit max1363_probe(struct i2c_client *client,
else
iio_device_unregister(indio_dev);
error_disable_reg:
if (!IS_ERR(st->reg))
regulator_disable(st->reg);
regulator_disable(reg);
error_put_reg:
if (!IS_ERR(st->reg))
regulator_put(st->reg);

regulator_put(reg);
error_out:
return ret;
}

Expand Down

0 comments on commit f7d9dda

Please sign in to comment.