HID: reject input outside logical range only if null state is set
authorValtteri Heikkilä <[email protected]>
Tue, 14 Feb 2017 23:14:32 +0000 (23:14 +0000)
committerJiri Kosina <[email protected]>
Mon, 6 Mar 2017 13:02:37 +0000 (14:02 +0100)
commit3f3752705dbd50b66b66ad7b4d54fe33d2f746ed
tree9e7627aebcaa91d143db8d3cd11b3a44fa913946
parent81bbef23db51c0b450d90607fbbc2ad80ee0d43f
HID: reject input outside logical range only if null state is set

This patch fixes an issue in drivers/hid/hid-input.c where USB HID
control null state flag is not checked upon rejecting inputs outside
logical minimum-maximum range. The check should be made according to USB
HID specification 1.11, section 6.2.2.5, p.31. The fix will resolve
issues with some game controllers, such as:
https://bugzilla.kernel.org/show_bug.cgi?id=68621

[[email protected]: shortened and fixed spelling in commit message]
Signed-off-by: Valtteri Heikkilä <[email protected]>
Signed-off-by: Tomasz Kramkowski <[email protected]>
Acked-By: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/hid-input.c