aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 852989fc5757..84df80e3efc1 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1045,6 +1045,9 @@ void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
1045 1045
1046 rsize = ((report->size - 1) >> 3) + 1; 1046 rsize = ((report->size - 1) >> 3) + 1;
1047 1047
1048 if (rsize > HID_MAX_BUFFER_SIZE)
1049 rsize = HID_MAX_BUFFER_SIZE;
1050
1048 if (csize < rsize) { 1051 if (csize < rsize) {
1049 dbg_hid("report %d is too short, (%d < %d)\n", report->id, 1052 dbg_hid("report %d is too short, (%d < %d)\n", report->id,
1050 csize, rsize); 1053 csize, rsize);