]> git.baikalelectronics.ru Git - kernel.git/commit
HID: fix oops in hid_check_keys_pressed()
authorJiri Kosina <jkosina@suse.cz>
Fri, 1 May 2009 22:02:57 +0000 (00:02 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 1 May 2009 22:02:57 +0000 (00:02 +0200)
commit080f45ca465362dba45c8f708220350ea3e56d8e
treebf123fe05a3310667c8f8024f7b459a40cef010e
parentc7099651ac1b16a414b51e8044c30add68f246d2
HID: fix oops in hid_check_keys_pressed()

If the device is not claimed by hid-input (i.e devices driver by userspace
hiddev/hidraw-based drivers, or completely detached from HID
and driver by libusb), we must not check the hid->inptus, as it
is not guaranteed to be initialized, as this is performed only for devices
handled by hid-input.

Reported-by: Guillaume Chazarain <guichaz@gmail.com>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c