summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ti-adc128s052.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-18 09:43:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-18 09:43:37 +0200
commitb5bc8ac25aa1477fee3853718f2673a594efdc4b (patch)
treedcee1a7ae080d573c12a4a0411b9417746ffd343 /drivers/iio/adc/ti-adc128s052.c
parent1f8818e352f721c49ebea39025f6c98f25756eff (diff)
parent519d81956ee277b4419c723adfb154603c2565ba (diff)
Merge 5.15-rc6 into driver-core-next
We need the driver-core fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/ti-adc128s052.c')
-rw-r--r--drivers/iio/adc/ti-adc128s052.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
index 3143f35a6509..83c1ae07b3e9 100644
--- a/drivers/iio/adc/ti-adc128s052.c
+++ b/drivers/iio/adc/ti-adc128s052.c
@@ -171,7 +171,13 @@ static int adc128_probe(struct spi_device *spi)
mutex_init(&adc->lock);
ret = iio_device_register(indio_dev);
+ if (ret)
+ goto err_disable_regulator;
+ return 0;
+
+err_disable_regulator:
+ regulator_disable(adc->reg);
return ret;
}