mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00:00
media: flexcop-usb: fix sanity check of bNumEndpoints
[ Upstream commitf62dc8f6bf
] Commitd725d20e81
("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:d725d20e81
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c11caf1339
commit
a2d61b328e
1 changed files with 1 additions and 1 deletions
|
@ -514,7 +514,7 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)
|
|||
|
||||
alt = fc_usb->uintf->cur_altsetting;
|
||||
|
||||
if (alt->desc.bNumEndpoints < 1)
|
||||
if (alt->desc.bNumEndpoints < 2)
|
||||
return -ENODEV;
|
||||
if (!usb_endpoint_is_isoc_in(&alt->endpoint[0].desc))
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Reference in a new issue