summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-12-14 17:35:01 +0700
committerhathach <[email protected]>2022-12-16 17:08:37 +0700
commitf0c51eae44e4cd8f38fdba6469e49b1d98100d7c (patch)
tree8014b64f06303a2dad0997e9b62b7c949ce10768 /src/host
parent4f0369508450883504e377b40aaec8860c8cb256 (diff)
cdc check for bNumEndpoints before checking for endpoint descriptor
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index ca42a523c..b0cd62bac 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -1524,8 +1524,7 @@ static bool _parse_configuration_descriptor(uint8_t dev_addr, tusb_desc_configur
TU_ASSERT(drv_len >= sizeof(tusb_desc_interface_t));
// Find driver for this interface
- uint8_t drv_id;
- for (drv_id = 0; drv_id < USBH_CLASS_DRIVER_COUNT; drv_id++)
+ for (uint8_t drv_id = 0; drv_id < USBH_CLASS_DRIVER_COUNT; drv_id++)
{
usbh_class_driver_t const * driver = &usbh_class_drivers[drv_id];