diff options
| author | W GTO <[email protected]> | 2026-09-22 17:54:15 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-10-14 10:17:15 +0800 |
| commit | 8acbb5df8ec50d9c76f7cb407cc7970e7eecdb28 (patch) | |
| tree | c1690abdf270ec836ee010105f9cd7f344bdcbca /components | |
| parent | 06f193d6822f82c1aa46a85c5e65a4ae98119d90 (diff) | |
[drivers][usb] Clarify the configuration interface count check
Diffstat (limited to 'components')
| -rw-r--r-- | components/legacy/usb/usbhost/core/usbhost_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/legacy/usb/usbhost/core/usbhost_core.c b/components/legacy/usb/usbhost/core/usbhost_core.c index 6641fe3cdc..6fea444b02 100644 --- a/components/legacy/usb/usbhost/core/usbhost_core.c +++ b/components/legacy/usb/usbhost/core/usbhost_core.c @@ -181,7 +181,7 @@ rt_err_t rt_usbh_attatch_instance(uinst_t device) return ret; } - /* Validate the full descriptor before indexing the interface array. */ + /* Check the count returned with the full configuration descriptor. */ if (device->cfg_desc->bNumInterfaces > USB_MAX_INTERFACE) { LOG_E("Too many USB interfaces: %d", device->cfg_desc->bNumInterfaces); |
