Merge tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[sfrench/cifs-2.6.git] / drivers / hwmon / ads1015.c
index 7f9dc2f86b63d639a3a05baa3debc9b2cf724a19..22e0c926989dca8dfe2644418049d56ae99ef2d9 100644 (file)
@@ -198,7 +198,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)
                }
 
                channel = be32_to_cpup(property);
-               if (channel > ADS1015_CHANNELS) {
+               if (channel >= ADS1015_CHANNELS) {
                        dev_err(&client->dev,
                                "invalid channel index %d on %s\n",
                                channel, node->full_name);