This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: flexcop-usb: fix sanity check of bNumEndpoints
Author:  Dongliang Mu <mudonglianga...@gmail.com>
Date:    Thu Jun 2 06:50:24 2022 +0100

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-dz...@hust.edu.cn
Fixes: d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type")
Signed-off-by: Dongliang Mu <mudonglianga...@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@kernel.org>

 drivers/media/usb/b2c2/flexcop-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c 
b/drivers/media/usb/b2c2/flexcop-usb.c
index 8f45e9156fbe..43dd3c932a85 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -515,7 +515,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;

Reply via email to