From: Kees Cook Date: Thu, 17 Apr 2014 20:22:09 +0000 (-0700) Subject: HID: core: fix validation of report id 0 X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~6^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b15d2e5b8077670b1e6a33250a0d9577efff4a5;p=pandora-kernel.git HID: core: fix validation of report id 0 Some drivers use the first HID report in the list instead of using an index. In these cases, validation uses ID 0, which was supposed to mean "first known report". This fixes the problem, which was causing at least the lgff family of devices to stop working since hid_validate_values was being called with ID 0, but the devices used single numbered IDs for their reports: 0x05, 0x01, /* Usage Page (Desktop), */ 0x09, 0x05, /* Usage (Gamepad), */ 0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x02, /* Collection (Logical), */ 0x85, 0x01, /* Report ID (1), */ ... Cc: stable@vger.kernel.org Reported-by: Simon Wood Signed-off-by: Kees Cook Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed