summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/ad5755.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/dac/ad5755.c')
-rw-r--r--drivers/iio/dac/ad5755.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index 0fde593ec0d9..5f7968232564 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -655,7 +655,7 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
devnr = 0;
for_each_child_of_node(np, pp) {
- if (devnr > AD5755_NUM_CHANNELS) {
+ if (devnr >= AD5755_NUM_CHANNELS) {
dev_err(dev,
"There is to many channels defined in DT\n");
goto error_out;
OpenPOWER on IntegriCloud