提交 bf7f5204 编写于 作者: D Dan Carpenter 提交者: Jonathan Cameron

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 c4784756
......@@ -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(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册