usb_hid: don't touch non-HID interfaces

Issue #4035
This commit is contained in:
Norman Feske 2021-03-02 14:29:13 +01:00
parent 2ce4a3b400
commit 80522fadf6

View File

@ -73,7 +73,11 @@ void Driver::Device::register_device()
struct usb_interface * iface = udev->config->interface[i];
struct usb_host_interface * alt = iface->cur_altsetting;
if (alt->desc.bInterfaceClass != USB_CLASS_HID)
continue;
for (int j = 0; j < alt->desc.bNumEndpoints; ++j) {
struct usb_host_endpoint * ep = &alt->endpoint[j];
int epnum = usb_endpoint_num(&ep->desc);
int is_out = usb_endpoint_dir_out(&ep->desc);