summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/ad5770r.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/dac/ad5770r.c')
-rw-r--r--drivers/iio/dac/ad5770r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad5770r.c b/drivers/iio/dac/ad5770r.c
index a98ea76732e7..2d7623b9b2c0 100644
--- a/drivers/iio/dac/ad5770r.c
+++ b/drivers/iio/dac/ad5770r.c
@@ -525,7 +525,7 @@ static int ad5770r_channel_config(struct ad5770r_state *st)
ret = fwnode_property_read_u32(child, "num", &num);
if (ret)
return ret;
- if (num > AD5770R_MAX_CHANNELS)
+ if (num >= AD5770R_MAX_CHANNELS)
return -EINVAL;
ret = fwnode_property_read_u32_array(child,