Message ID | 20210901163600.GB404634@rowland.harvard.edu (mailing list archive) |
---|---|
State | Mainlined |
Commit | 0a824efdb724e07574bafcd2c2486b2a3de35ff6 |
Delegated to: | Jiri Kosina |
Headers | show |
Series | [1/3] HID: usbhid: Fix flood of "control queue full" messages | expand |
Index: usb-devel/drivers/hid/usbhid/hid-core.c =================================================================== --- usb-devel.orig/drivers/hid/usbhid/hid-core.c +++ usb-devel/drivers/hid/usbhid/hid-core.c @@ -389,6 +389,7 @@ static int hid_submit_ctrl(struct hid_de maxpacket = usb_maxpacket(hid_to_usb_dev(hid), usbhid->urbctrl->pipe, 0); if (maxpacket > 0) { + len += (len == 0); /* Don't allow 0-length reports */ len = DIV_ROUND_UP(len, maxpacket); len *= maxpacket; if (len > usbhid->bufsize)