diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-11-03 12:50:41 +0100 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-11-03 12:50:41 +0100 |
commit | 7d9a6ef558f6ff375aab9e29f08124cb0daa9bc5 (patch) | |
tree | 3916e6cf9678a41081ae822ef67ec5cae1c1fffa /drivers/iio/adc/twl4030-madc.c | |
parent | platform/x86: silead_dmi: Add entry for the Digma e200 tablet (diff) | |
parent | i2c-cht-wc: Add device-properties for fusb302 integration (diff) | |
download | linux-7d9a6ef558f6ff375aab9e29f08124cb0daa9bc5.tar.xz linux-7d9a6ef558f6ff375aab9e29f08124cb0daa9bc5.zip |
Merge branch 'i2c/cht-wc-fusb302-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c/cht-wc-fusb302-immutable immutable branch from Wolfram Sang:
as discussed before, here is the immutable branch for the i2c-cht-wc
driver, so you can safely apply Hans' patch [1]
"platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties"
on top of this.
[1] http://patchwork.ozlabs.org/patch/824314/
Diffstat (limited to 'drivers/iio/adc/twl4030-madc.c')
-rw-r--r-- | drivers/iio/adc/twl4030-madc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c index 1edd99f0c5e5..e3cfb91bffc6 100644 --- a/drivers/iio/adc/twl4030-madc.c +++ b/drivers/iio/adc/twl4030-madc.c @@ -887,21 +887,27 @@ static int twl4030_madc_probe(struct platform_device *pdev) /* Enable 3v1 bias regulator for MADC[3:6] */ madc->usb3v1 = devm_regulator_get(madc->dev, "vusb3v1"); - if (IS_ERR(madc->usb3v1)) - return -ENODEV; + if (IS_ERR(madc->usb3v1)) { + ret = -ENODEV; + goto err_i2c; + } ret = regulator_enable(madc->usb3v1); - if (ret) + if (ret) { dev_err(madc->dev, "could not enable 3v1 bias regulator\n"); + goto err_i2c; + } ret = iio_device_register(iio_dev); if (ret) { dev_err(&pdev->dev, "could not register iio device\n"); - goto err_i2c; + goto err_usb3v1; } return 0; +err_usb3v1: + regulator_disable(madc->usb3v1); err_i2c: twl4030_madc_set_current_generator(madc, 0, 0); err_current_generator: |