Skip to content

Commit 39b3c3a

Browse files
committed
HID: input: fix assignment of .value
The value field is actually an array of .maxfield. We should assign the correct number to the correct usage. Not that we never encounter a device that requires this ATM, but better have the proper code path. Fixes: 2dc702c ("HID: input: use the Resolution Multiplier for high-resolution scrolling") Cc: [email protected] # v5.0+ Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent d43c17e commit 39b3c3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ static bool __hidinput_change_resolution_multipliers(struct hid_device *hid,
15801580
if (usage->hid != HID_GD_RESOLUTION_MULTIPLIER)
15811581
continue;
15821582

1583-
*report->field[i]->value = value;
1583+
report->field[i]->value[j] = value;
15841584
update_needed = true;
15851585
}
15861586
}

0 commit comments

Comments
 (0)