mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-11 20:07:00 +00:00
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>
This commit is contained in:
parent
c4784756a5
commit
bf7f5204ab
@ -327,7 +327,7 @@ int hid_sensor_format_scale(u32 usage_id,
|
|||||||
*val0 = 1;
|
*val0 = 1;
|
||||||
*val1 = 0;
|
*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 &&
|
if (unit_conversion[i].usage_id == usage_id &&
|
||||||
unit_conversion[i].unit == attr_info->units) {
|
unit_conversion[i].unit == attr_info->units) {
|
||||||
exp = hid_sensor_convert_exponent(
|
exp = hid_sensor_convert_exponent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user