]> git.baikalelectronics.ru Git - kernel.git/commit
HID: rmi: Check that a device is a RMI device before calling RMI functions
authorAndrew Duggan <aduggan@synaptics.com>
Wed, 18 Oct 2017 01:37:36 +0000 (18:37 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 19 Oct 2017 08:03:50 +0000 (10:03 +0200)
commite5d905afb377a9e171dafddd9ada443bd40d7d00
tree168d34355b77bdf9cedc918e7fbd2ffd4a28e18d
parent56107c3fcfe2d0da2a0194ea1e1ca2242a8606df
HID: rmi: Check that a device is a RMI device before calling RMI functions

The hid-rmi driver may handle non rmi devices on composite USB devices.
Callbacks need to make sure that the current device is a RMI device before
calling RMI specific functions. Most callbacks already have this check, but
this patch adds checks to the remaining callbacks.

Reported-by: Hendrik Langer <hendrik.langer@gmx.de>
Tested-by: Hendrik Langer <hendrik.langer@gmx.de>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-rmi.c