]> git.hungrycats.org Git - linux/commit
media: dvb_frontend: don't play tricks with underflow values
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 15 Oct 2024 14:05:16 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Nov 2024 13:59:36 +0000 (14:59 +0100)
commite351002b3a7aac22055385eb33acb5b4a1013733
tree1d60ca96e4a88eeeb7e2a087542c0a0463aa5320
parenta4a17210c03ade1c8d9a9f193a105654b7a05c11
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@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/dvb-core/dvb_frontend.c