Message ID | CAKsRvPPjk7RZanEwO3hVa+UZ9_zq6xWakOxckBfx-a+_bEgUtA@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [BUG,+] HID ELAN9038 probe fails with "report is too long" | expand |
diff -rupN linux-4.19.97/drivers/hid/hid-core.c linux-4.19.97-1/drivers/hid/hid-core.c --- linux-4.19.97/drivers/hid/hid-core.c 2020-01-17 18:47:17.000000000 +0000 +++ linux-4.19.97-1/drivers/hid/hid-core.c 2020-01-19 16:31:31.823005977 +0000 @@ -290,8 +290,11 @@ static int hid_add_field(struct hid_pars /* Total size check: Allow for possible report index byte */ if (report->size > (HID_MAX_BUFFER_SIZE - 1) << 3) { - hid_err(parser->device, "report is too long\n"); - return -1; + hid_err(parser->device, + "report is too long: %d > %d\n", + report->size, + (HID_MAX_BUFFER_SIZE - 1) << 3); + return 0; } if (!parser->local.usage_index) /* Ignore padding fields */