Skip to content

Commit 8acbb5d

Browse files
manyangshenRbb666
authored andcommitted
[drivers][usb] Clarify the configuration interface count check
1 parent 06f193d commit 8acbb5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎components/legacy/usb/usbhost/core/usbhost_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ rt_err_t rt_usbh_attatch_instance(uinst_t device)
181181
return ret;
182182
}
183183

184-
/* Validate the full descriptor before indexing the interface array. */
184+
/* Check the count returned with the full configuration descriptor. */
185185
if (device->cfg_desc->bNumInterfaces > USB_MAX_INTERFACE)
186186
{
187187
LOG_E("Too many USB interfaces: %d", device->cfg_desc->bNumInterfaces);

0 commit comments

Comments
 (0)