Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
[linux-2.6-microblaze.git] / drivers / hid / hid-multitouch.c
index c34e972..5df5dd5 100644 (file)
@@ -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;