diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-09-05 07:56:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-05-10 06:38:10 -0400 |
commit | bf7f5204abdba94032ff7cae1c9c8c9e7671d246 (patch) | |
tree | a761aa216ec4b9b0ce60372c4b29349e4e0b9968 /drivers/iio | |
parent | c4784756a53f7b17056f5d86fe0eb9740d235578 (diff) |
iio: hid-sensors: typo leads to potential forever loop
The "i < " was missing in this condition.
Fixes: 5d02edfc3957 ('iio: hid-sensors: Convert units and exponent')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 2 |
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, | |||
327 | *val0 = 1; | 327 | *val0 = 1; |
328 | *val1 = 0; | 328 | *val1 = 0; |
329 | 329 | ||
330 | for (i = 0; ARRAY_SIZE(unit_conversion); ++i) { | 330 | for (i = 0; i < ARRAY_SIZE(unit_conversion); ++i) { |
331 | if (unit_conversion[i].usage_id == usage_id && | 331 | if (unit_conversion[i].usage_id == usage_id && |
332 | unit_conversion[i].unit == attr_info->units) { | 332 | unit_conversion[i].unit == attr_info->units) { |
333 | exp = hid_sensor_convert_exponent( | 333 | exp = hid_sensor_convert_exponent( |