Skip to content

Commit 15fc1b5

Browse files
committed
Revert "HID: Increase maximum report size allowed by hid_field_extract()"
This reverts commit 94a9992. The commit allows for more than 32 bits in hid_field_extract(), but the return value is a 32 bits int. So basically what this commit is doing is just silencing those legitimate errors. Revert to a previous situation in the hope that a proper fix will be impletemented. Fixes: 94a9992 ("HID: Increase maximum report size allowed by hid_field_extract()") Cc: [email protected] # v5.1 Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent abf82e8 commit 15fc1b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/hid-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,10 +1314,10 @@ static u32 __extract(u8 *report, unsigned offset, int n)
13141314
u32 hid_field_extract(const struct hid_device *hid, u8 *report,
13151315
unsigned offset, unsigned n)
13161316
{
1317-
if (n > 256) {
1318-
hid_warn(hid, "hid_field_extract() called with n (%d) > 256! (%s)\n",
1317+
if (n > 32) {
1318+
hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n",
13191319
n, current->comm);
1320-
n = 256;
1320+
n = 32;
13211321
}
13221322

13231323
return __extract(report, offset, n);

0 commit comments

Comments
 (0)