Skip to contentSkip to conversation

iio: amplifiers: ad8366: Remove regulator_put

PATCH Applied Sachin Kamat 2 participants 2 messages Sep 24, 2013 – Sep 28, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: amplifiers: ad8366: Remove regulator_put

Since devm_regulator_get is used, regulator_put should not be used. Remove it.

---
 drivers/iio/amplifiers/ad8366.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/amplifiers/ad8366.c +1 -3
index d0a79a4..ba6f6a9 100644
@@ -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;
 }
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 4 lines · Sachin Kamat

Since devm_regulator_get is used, regulator_put should not be used. Remove it.

Applied to the fixes-togreg branch of iio.git

Thanks

Quoted 21 lines
---
 drivers/iio/amplifiers/ad8366.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/amplifiers/ad8366.c +1 -3
index d0a79a4..ba6f6a9 100644
@@ -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;
 }