Message ID | 20220602055027.849014-1-dzm91@hust.edu.cn |
---|---|
State | New |
Headers | show |
Series | media: flexcop-usb: fix sanity check of bNumEndpoints | expand |
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c index 7835bb0f32fc..eb54bfdda01f 100644 --- a/drivers/media/usb/b2c2/flexcop-usb.c +++ b/drivers/media/usb/b2c2/flexcop-usb.c @@ -509,7 +509,7 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb) return ret; } - if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1) + if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 2) return -ENODEV; if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[1].desc)) return -ENODEV;