summaryrefslogtreecommitdiffstats
path: root/drivers/iio/amplifiers/ad8366.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/amplifiers/ad8366.c')
-rw-r--r--drivers/iio/amplifiers/ad8366.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
index d0a79a4bce1c..ba6f6a91dfff 100644
--- a/drivers/iio/amplifiers/ad8366.c
+++ b/drivers/iio/amplifiers/ad8366.c
@@ -185,10 +185,8 @@ static int ad8366_remove(struct spi_device *spi)
iio_device_unregister(indio_dev);
- if (!IS_ERR(reg)) {
+ if (!IS_ERR(reg))
regulator_disable(reg);
- regulator_put(reg);
- }
return 0;
}
OpenPOWER on IntegriCloud