diff options
-rw-r--r-- | drivers/usb/input/hid-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 45f3130fadea..a3e44ef1df43 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -893,8 +893,10 @@ static int hid_input_report(int type, struct urb *urb, int interrupt, struct pt_ | |||
893 | 893 | ||
894 | size = ((report->size - 1) >> 3) + 1; | 894 | size = ((report->size - 1) >> 3) + 1; |
895 | 895 | ||
896 | if (len < size) | 896 | if (len < size) { |
897 | dbg("report %d is too short, (%d < %d)", report->id, len, size); | 897 | dbg("report %d is too short, (%d < %d)", report->id, len, size); |
898 | memset(data + len, 0, size - len); | ||
899 | } | ||
898 | 900 | ||
899 | if (hid->claimed & HID_CLAIMED_HIDDEV) | 901 | if (hid->claimed & HID_CLAIMED_HIDDEV) |
900 | hiddev_report_event(hid, report); | 902 | hiddev_report_event(hid, report); |