aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/ad7292.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/adc/ad7292.c')
-rw-r--r--drivers/iio/adc/ad7292.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad7292.c b/drivers/iio/adc/ad7292.c
index 2eafbe7ac7c7..ab204e9199e9 100644
--- a/drivers/iio/adc/ad7292.c
+++ b/drivers/iio/adc/ad7292.c
@@ -310,8 +310,10 @@ static int ad7292_probe(struct spi_device *spi)
for_each_available_child_of_node(spi->dev.of_node, child) {
diff_channels = of_property_read_bool(child, "diff-channels");
- if (diff_channels)
+ if (diff_channels) {
+ of_node_put(child);
break;
+ }
}
if (diff_channels) {