]> git.hungrycats.org Git - linux/commit
media: stb0899_algo: initialize cfr before using it
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 15 Oct 2024 11:29:43 +0000 (13:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Nov 2024 13:59:36 +0000 (14:59 +0100)
commitae6fd157eae4444623650ef2faa40ed5463e1c47
tree5d48925c5669b712dd87aad67ce6917fac812c19
parent63b122f537937c9fa6433af56d30cc71620213ee
media: stb0899_algo: initialize cfr before using it

commit 2d861977e7314f00bf27d0db17c11ff5e85e609a upstream.

The loop at stb0899_search_carrier() starts with a random
value for cfr, as reported by Coverity.

Initialize it to zero, just like stb0899_dvbs_algo() to ensure
that carrier search won't bail out.

Fixes: 8bd135bab91f ("V4L/DVB (9375): Add STB0899 support")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-frontends/stb0899_algo.c