summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-attributes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 372964635ccf..3052eb150099 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -327,7 +327,7 @@ int hid_sensor_format_scale(u32 usage_id,
*val0 = 1;
*val1 = 0;
- for (i = 0; ARRAY_SIZE(unit_conversion); ++i) {
+ for (i = 0; i < ARRAY_SIZE(unit_conversion); ++i) {
if (unit_conversion[i].usage_id == usage_id &&
unit_conversion[i].unit == attr_info->units) {
exp = hid_sensor_convert_exponent(