Patch "media: dvb_frontend: don't play tricks with underflow values" has been added to the 6.6-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: dvb_frontend: don't play tricks with underflow values

to the 6.6-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-dvb_frontend-don-t-play-tricks-with-underflow-.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 971596dcc45873cd92018e461e0ba401ddc0ca45
Author: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
Date:   Tue Oct 15 16:05:16 2024 +0200

    media: dvb_frontend: don't play tricks with underflow values
    
    [ Upstream commit 9883a4d41aba7612644e9bb807b971247cea9b9d ]
    
    fepriv->auto_sub_step is unsigned. Setting it to -1 is just a
    trick to avoid calling continue, as reported by Coverity.
    
    It relies to have this code just afterwards:
    
            if (!ready) fepriv->auto_sub_step++;
    
    Simplify the code by simply setting it to zero and use
    continue to return to the while loop.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 93d3378a0df4b..344dc9dc6613f 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -443,8 +443,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
 
 		default:
 			fepriv->auto_step++;
-			fepriv->auto_sub_step = -1; /* it'll be incremented to 0 in a moment */
-			break;
+			fepriv->auto_sub_step = 0;
+			continue;
 		}
 
 		if (!ready) fepriv->auto_sub_step++;




[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