aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-10 17:23:36 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-10 17:23:36 -0700
commite676853c8c3f77166c03f1eea7dab6e854eeb819 (patch)
tree0cbd6fda6a8cdc568b3b67fe188c5ca45bb8db59
parent8bd51cce98aa80ff8b56d34a0e48316c5f887818 (diff)
parent8da7d1bae512aee155ef02f7ab1266358842e1fd (diff)
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
-rw-r--r--drivers/hid/hid-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 67f3347afcf..1cca32f4694 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -969,7 +969,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
if (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)