iio: hid-sensors: typo leads to potential forever loop

The "i < " was missing in this condition.

Fixes: 5d02edfc39 ('iio: hid-sensors: Convert units and exponent')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Dan Carpenter 2014-09-05 12:56:00 +01:00 committed by Jonathan Cameron
parent c4784756a5
commit bf7f5204ab
1 changed files with 1 additions and 1 deletions

View File

@ -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(