Commit e676853c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

* 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Do not discard truncated input reports
parents 8bd51cce 8da7d1ba
...@@ -969,7 +969,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i ...@@ -969,7 +969,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
if (size < rsize) { if (size < rsize) {
dbg("report %d is too short, (%d < %d)", report->id, size, rsize); dbg("report %d is too short, (%d < %d)", report->id, size, rsize);
return -1; memset(data + size, 0, rsize - size);
} }
if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
......
Markdown is supported
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