stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jiri Kosina <jikos@kernel.org>, James Feeney <james@nurealm.net>,
	Peter Hutterer <peter.hutterer@who-t.net>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	stable@vger.kernel.org
Subject: [PATCH 2/2] HID: input: fix assignment of .value
Date: Tue, 23 Apr 2019 17:46:15 +0200	[thread overview]
Message-ID: <20190423154615.18257-2-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <20190423154615.18257-1-benjamin.tissoires@redhat.com>

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>
---
 drivers/hid/hid-input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 		}
 	}
-- 
2.19.2


  reply	other threads:[~2019-04-23 15:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 15:46 [PATCH 1/2] HID: input: make sure the wheel high resolution multiplier is set Benjamin Tissoires
2019-04-23 15:46 ` Benjamin Tissoires [this message]
     [not found]   ` <20190423172117.CC66520835@mail.kernel.org>
2019-04-23 17:54     ` [PATCH 2/2] HID: input: fix assignment of .value James Feeney
2019-04-23 19:36       ` Sasha Levin
2019-04-24 13:30 ` [PATCH 1/2] HID: input: make sure the wheel high resolution multiplier is set Benjamin Tissoires
2019-04-24 15:42   ` James Feeney
2019-04-24 16:41     ` Benjamin Tissoires
2019-06-14 22:09       ` James Feeney
2019-06-15  5:50         ` Greg KH
2019-06-15  9:03           ` Thomas Backlund
2019-06-15 15:29             ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423154615.18257-2-benjamin.tissoires@redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=james@nurealm.net \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).