Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3011242ybi; Mon, 17 Jun 2019 14:38:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwHRQbx2hnXe8lTVwrwa5PfDKDqdBcC4Bt/aHErx9g0f6XNi4y9QW2U2fab+p5oH61yKTN X-Received: by 2002:a17:90a:d3c3:: with SMTP id d3mr1248428pjw.17.1560807510224; Mon, 17 Jun 2019 14:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560807510; cv=none; d=google.com; s=arc-20160816; b=RxeO7IxcMug771a+7fBFgGLjJOHAzU4Vrr5BC1V+fnUPOCS/qXEm2P0G6FhIhsyfgG UN9i80U2QUXkP2hVGySONJreqTHYvRjtmejTql4O53fs8Ch4JjmQfyHsw7/OqXhAyVUk w7osJmgprCaVBPXPz4sTnI2Kw37GnZoCQ6JdCfPuKKR0rc2cUft1YatZmwM9erkoR2pa ax9ZVKabSop+/fA8nncXGNj5bp9M/1xuWr69q99aDzdvEyhzYsnBrzUHLdX4ZiW63bpi qWrIIuY/ldxW3rRxxVTVXVUYc9eZrpUL/mH1pHrzUuw53nf/FRrMjKa7IWkOE9QLxztV uD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0ZrCXr8OVaISsq0teZWEm8ZKynPJa3mEC6EtP+dQ18I=; b=j3byi2Q+JFaKcq0WzcLZXXPx8yduIrnF/JkgO+4JdEYsnUehrB8Meowb52f0d0H+05 vFl+OwIS85GlanGg/ntpdNVa4MsW+/Rk5WA7l+ged9r0EYh7epjsA0hA9bFbc4iRXZAi QVxkIrU/oNt0XrlutCcaYCNIVCtoRbrtW7am0JnrCZn7u1G9lI4H6/HQIxmJV0BXMX/9 NifLg7Df6QWdb00oEJIw9omBzskMLm9+5mPZnPUurFBb2CvC9oqlzSG96Hf0uSs+M9EQ lkZiR0fG2VcErwTZImdcpkIJQZqIHd66ByUw6TGLgmeVbNt8EBexl/bCRwjnxkZRoyXh TE9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wZN/IxO3"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si6454417pfq.181.2019.06.17.14.38.15; Mon, 17 Jun 2019 14:38:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wZN/IxO3"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729008AbfFQVUJ (ORCPT + 99 others); Mon, 17 Jun 2019 17:20:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:44186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727768AbfFQVUH (ORCPT ); Mon, 17 Jun 2019 17:20:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 58D532089E; Mon, 17 Jun 2019 21:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560806406; bh=QKdJ5JSiilDuojvUedJrJMd7Km5HZo8Bo7krkXaevPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wZN/IxO3M5Om7/B2c60l54gFDoSF2QkSQWB/qgfxVVjS5dTzCDkK/1jHQ950ryntL yC5zwZL+LjqyhoB3EhA9/N/Fir3P0iRMOo+eyLdRJZGc4XzISnkwO9Phxy0YCpPb9O h8kjwM8wYgGJWstrP9c8aTe4HixmEtup8zAWlzys= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Tissoires Subject: [PATCH 5.1 004/115] HID: input: fix assignment of .value Date: Mon, 17 Jun 2019 23:08:24 +0200 Message-Id: <20190617210800.141354191@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190617210759.929316339@linuxfoundation.org> References: <20190617210759.929316339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Benjamin Tissoires commit 39b3c3a5fbc5d744114e497d35bf0c12f798c134 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1595,7 +1595,7 @@ static bool __hidinput_change_resolution if (usage->hid != HID_GD_RESOLUTION_MULTIPLIER) continue; - *report->field[i]->value = value; + report->field[i]->value[j] = value; update_needed = true; } }