Patch "media: usb: Check az6007_read() return value" has been added to the 4.19-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: usb: Check az6007_read() return value

to the 4.19-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-usb-check-az6007_read-return-value.patch
and it can be found in the queue-4.19 subdirectory.

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



commit d012063f1e944dad67033cc0cd1fde30da0e3268
Author: Daniil Dulov <d.dulov@xxxxxxxxxx>
Date:   Tue Mar 14 10:04:49 2023 -0700

    media: usb: Check az6007_read() return value
    
    [ Upstream commit fdaca63186f59fc664b346c45b76576624b48e57 ]
    
    If az6007_read() returns error, there is no sence to continue.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 3af2f4f15a61 ("[media] az6007: Change the az6007 read/write routine parameter")
    Signed-off-by: Daniil Dulov <d.dulov@xxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/dvb-usb-v2/az6007.c b/drivers/media/usb/dvb-usb-v2/az6007.c
index 746926364535d..8e914be5b7c5e 100644
--- a/drivers/media/usb/dvb-usb-v2/az6007.c
+++ b/drivers/media/usb/dvb-usb-v2/az6007.c
@@ -210,7 +210,8 @@ static int az6007_rc_query(struct dvb_usb_device *d)
 	unsigned code;
 	enum rc_proto proto;
 
-	az6007_read(d, AZ6007_READ_IR, 0, 0, st->data, 10);
+	if (az6007_read(d, AZ6007_READ_IR, 0, 0, st->data, 10) < 0)
+		return -EIO;
 
 	if (st->data[1] == 0x44)
 		return 0;



[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