Patch "media: flexcop-usb: fix sanity check of bNumEndpoints" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: flexcop-usb: fix sanity check of bNumEndpoints

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-flexcop-usb-fix-sanity-check-of-bnumendpoints.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cd65f17359db1bef1862903042cb055984f05310
Author: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
Date:   Thu Jun 2 06:50:24 2022 +0100

    media: flexcop-usb: fix sanity check of bNumEndpoints
    
    [ Upstream commit f62dc8f6bf82d1b307fc37d8d22cc79f67856c2f ]
    
    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@xxxxxxxxxxx
    Fixes: d725d20e81c2 ("media: flexcop-usb: sanity checking of endpoint type")
    Signed-off-by: Dongliang Mu <mudongliangabcd@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 0b5c2f3a54ab4..0354614351cbf 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -513,7 +513,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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux