From 8acbb5df8ec50d9c76f7cb407cc7970e7eecdb28 Mon Sep 17 00:00:00 2001 From: W GTO <1663292285@qq.com> Date: Tue, 22 Sep 2026 17:54:15 +0800 Subject: [drivers][usb] Clarify the configuration interface count check --- components/legacy/usb/usbhost/core/usbhost_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components') 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); -- cgit v1.3.1