summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-11-01 10:07:56 +0700
committerhathach <[email protected]>2019-11-01 10:07:56 +0700
commit981e64d8a175463d8788c8bf2cb98ce97b630814 (patch)
tree7b59e08483b168319f79662171f0f21b4fb5cb62 /src/class/hid
parentbd8b4e48dc4a7430fa1e03f298a86bb0b7135c31 (diff)
implement pigrew review
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 558adc2bb..fc2e6b35a 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -241,7 +241,8 @@ bool hidd_control_request(uint8_t rhport, tusb_control_request_t const * p_reque
break;
case HID_REQ_CONTROL_SET_REPORT:
- tud_control_xfer(rhport, p_request, p_hid->epout_buf, tu_min16(sizeof(p_hid->epout_buf), p_request->wLength));
+ TU_VERIFY(p_request->wLength <= sizeof(p_hid->epout_buf));
+ tud_control_xfer(rhport, p_request, p_hid->epout_buf, p_request->wLength);
break;
case HID_REQ_CONTROL_SET_IDLE: