Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: flexcop-usb: fix sanity check of bNumEndpoints

Commit d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type
") adds a sanity check for endpoint[1], but fails to modify the sanity
check of bNumEndpoints.

Fix this by modifying the sanity check of bNumEndpoints to 2.

Link: https://lore.kernel.org/linux-media/20220602055027.849014-1-dzm91@hust.edu.cn
Fixes: d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Dongliang Mu and committed by
Mauro Carvalho Chehab
f62dc8f6 82fe45f3

+1 -1
+1 -1
drivers/media/usb/b2c2/flexcop-usb.c
··· 515 515 516 516 alt = fc_usb->uintf->cur_altsetting; 517 517 518 - if (alt->desc.bNumEndpoints < 1) 518 + if (alt->desc.bNumEndpoints < 2) 519 519 return -ENODEV; 520 520 if (!usb_endpoint_is_isoc_in(&alt->endpoint[0].desc)) 521 521 return -ENODEV;