diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-04-18 09:47:41 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-04-24 15:25:29 +0200 |
commit | 39b3c3a5fbc5d744114e497d35bf0c12f798c134 (patch) | |
tree | 01b61984e0dfb98020e7cebc2b8910d91fca9f1a /drivers/hid/hid-input.c | |
parent | d43c17ead879ba7c076dc2f5fd80cd76047c9ff4 (diff) | |
download | linux-stable-39b3c3a5fbc5d744114e497d35bf0c12f798c134.tar.gz linux-stable-39b3c3a5fbc5d744114e497d35bf0c12f798c134.tar.bz2 linux-stable-39b3c3a5fbc5d744114e497d35bf0c12f798c134.zip |
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: 2dc702c991e377 ("HID: input: use the Resolution Multiplier for
high-resolution scrolling")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index fadf76f0a386..6dd0294e1133 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1580,7 +1580,7 @@ static bool __hidinput_change_resolution_multipliers(struct hid_device *hid, if (usage->hid != HID_GD_RESOLUTION_MULTIPLIER) continue; - *report->field[i]->value = value; + report->field[i]->value[j] = value; update_needed = true; } } |