Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf7f5204 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron
Browse files

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



The "i < " was missing in this condition.

Fixes: 5d02edfc ('iio: hid-sensors: Convert units and exponent')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent c4784756
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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(