Patch "media: qm1d1c0042: fix error return code in qm1d1c0042_init()" has been added to the 5.4-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: qm1d1c0042: fix error return code in qm1d1c0042_init()

to the 5.4-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-qm1d1c0042-fix-error-return-code-in-qm1d1c0042.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 4bae5e570566100bab49e40c4c56528f8c29ddb1
Author: Luo Meng <luomeng12@xxxxxxxxxx>
Date:   Wed Nov 25 02:34:37 2020 +0100

    media: qm1d1c0042: fix error return code in qm1d1c0042_init()
    
    [ Upstream commit fcf8d018bdca0453b8d6359062e6bc1512d04c38 ]
    
    Fix to return a negative error code from the error handling case
    instead of 0 in function qm1d1c0042_init(), as done elsewhere
    in this function.
    
    Fixes: ab4d14528fdf ("[media] em28xx: add support for PLEX PX-BCUD (ISDB-S)")
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Signed-off-by: Luo Meng <luomeng12@xxxxxxxxxx>
    Acked-by: Akihiro Tsukada <tskd08@xxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/tuners/qm1d1c0042.c b/drivers/media/tuners/qm1d1c0042.c
index 83ca5dc047ea2..baa9950783b66 100644
--- a/drivers/media/tuners/qm1d1c0042.c
+++ b/drivers/media/tuners/qm1d1c0042.c
@@ -343,8 +343,10 @@ static int qm1d1c0042_init(struct dvb_frontend *fe)
 		if (val == reg_initval[reg_index][0x00])
 			break;
 	}
-	if (reg_index >= QM1D1C0042_NUM_REG_ROWS)
+	if (reg_index >= QM1D1C0042_NUM_REG_ROWS) {
+		ret = -EINVAL;
 		goto failed;
+	}
 	memcpy(state->regs, reg_initval[reg_index], QM1D1C0042_NUM_REGS);
 	usleep_range(2000, 3000);
 



[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