Skip to content
Commit b786ae8e authored by Andrew Duggan's avatar Andrew Duggan Committed by Jiri Kosina
Browse files

HID: rmi: Check that the device is a RMI device in suspend and resume callbacks



Commit 09256360 ("HID: rmi: Disable scanning if the device is not a wake
source") introduced a regression for devices which use hid-rmi to handle
composite USB devices. The suspend or resume callbacks are not checking
that the device is a RMI device before calling rmi_read or rmi_write.
This results in dereferencing uninitialized variables on non RMI devices. This
patch checks that the RMI_DEVICE flag is set before sending RMI commands to the
device.

Reported-by: default avatarRodrigo Gomes <rodrigo.toste.gomes@gmail.com>
Signed-off-by: default avatarAndrew Duggan <aduggan@synaptics.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 962b7a0e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment