icE1usb: Don't consider altsetting with no endpoints as "ON"

find_altsetting_on() must not only find an altsetting with no
zero-sized endpoints, but must also make sure there actually
are endpoints.

This enables compatibility with icE1usb firmware >= 0.1-43-g9674436
This commit is contained in:
Harald Welte 2022-01-07 19:14:48 +01:00
parent 6e714c9268
commit d5935652ed
1 changed files with 1 additions and 1 deletions

View File

@ -862,7 +862,7 @@ static const struct usb_host_interface *find_altsetting_on(struct usb_interface
for (i = 0; i < intf->num_altsetting; i++) {
const struct usb_host_interface *alt = &intf->altsetting[i];
if (!has_ep_packetsize_zero(alt))
if (!has_ep_packetsize_zero(alt) && alt->desc.bNumEndpoints >= 3)
return alt;
}
return NULL;