aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-06-17 12:06:34 +0200
committerIngo Molnar <mingo@kernel.org>2019-06-17 12:06:34 +0200
commit410df0c5748f6c5a53847d2acb163dc7cd8b6c51 (patch)
tree0c0f547f90a73ec6d30851f93720e0eb24f353eb /drivers/hid/hid-multitouch.c
parentDocumentation/atomic_t.txt: Clarify pure non-rmw usage (diff)
parentLinux 5.2-rc5 (diff)
downloadlinux-dev-410df0c5748f6c5a53847d2acb163dc7cd8b6c51.tar.xz
linux-dev-410df0c5748f6c5a53847d2acb163dc7cd8b6c51.zip
Merge tag 'v5.2-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r--drivers/hid/hid-multitouch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index c34e972f6296..5df5dd56ecc8 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -637,6 +637,13 @@ static void mt_store_field(struct hid_device *hdev,
if (*target != DEFAULT_TRUE &&
*target != DEFAULT_FALSE &&
*target != DEFAULT_ZERO) {
+ if (usage->contactid == DEFAULT_ZERO ||
+ usage->x == DEFAULT_ZERO ||
+ usage->y == DEFAULT_ZERO) {
+ hid_dbg(hdev,
+ "ignoring duplicate usage on incomplete");
+ return;
+ }
usage = mt_allocate_usage(hdev, application);
if (!usage)
return;