diff options
author | Linus Torvalds | 2017-01-19 18:49:58 +0100 |
---|---|---|
committer | Linus Torvalds | 2017-01-19 18:49:58 +0100 |
commit | 2ed5e5af2f9d5fb583ac1d36ba819f787bafbda6 (patch) | |
tree | 008e7f07904c8b70c0bacab622fe11edcc7ebf8b /drivers/hid/wacom_wac.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s39... (diff) | |
parent | HID: wacom: Fix sibling detection regression (diff) | |
download | kernel-qcow2-linux-2ed5e5af2f9d5fb583ac1d36ba819f787bafbda6.tar.gz kernel-qcow2-linux-2ed5e5af2f9d5fb583ac1d36ba819f787bafbda6.tar.xz kernel-qcow2-linux-2ed5e5af2f9d5fb583ac1d36ba819f787bafbda6.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina:
- regression fix for generic Wacom devices, from Jason Gerecke
- DMA-on-stack fixes for hid-corsair driver, from Johan Hovold
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: wacom: Fix sibling detection regression
HID: corsair: fix control-transfer error handling
HID: corsair: fix DMA buffers on stack
Diffstat (limited to 'drivers/hid/wacom_wac.c')
-rw-r--r-- | drivers/hid/wacom_wac.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index b1a9a3ca6d56..0884dc9554fd 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2187,6 +2187,16 @@ void wacom_wac_report(struct hid_device *hdev, struct hid_report *report) wacom_report_events(hdev, report); + /* + * Non-input reports may be sent prior to the device being + * completely initialized. Since only their events need + * to be processed, exit after 'wacom_report_events' has + * been called to prevent potential crashes in the report- + * processing functions. + */ + if (report->type != HID_INPUT_REPORT) + return; + if (WACOM_PAD_FIELD(field)) { wacom_wac_pad_battery_report(hdev, report); if (wacom->wacom_wac.pad_input) |