Skip to content

Commit 763679f

Browse files
jhovoldgregkh
authored andcommitted
media: flexcop-usb: fix endpoint type check
Commit d725d20 ("media: flexcop-usb: sanity checking of endpoint type") tried to add an endpoint type sanity check for the single isochronous endpoint but instead broke the driver by checking the wrong descriptor or random data beyond the last endpoint descriptor. Make sure to check the right endpoint descriptor. Fixes: d725d20 ("media: flexcop-usb: sanity checking of endpoint type") Cc: Oliver Neukum <[email protected]> Cc: [email protected] # 5.9 Reported-by: Dongliang Mu <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ce00177 commit 763679f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/usb/b2c2/flexcop-usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)
511511

512512
if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1)
513513
return -ENODEV;
514-
if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[1].desc))
514+
if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[0].desc))
515515
return -ENODEV;
516516

517517
switch (fc_usb->udev->speed) {

0 commit comments

Comments
 (0)