Skip to content

Commit 2d86197

Browse files
committed
media: stb0899_algo: initialize cfr before using it
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: 8bd135b ("V4L/DVB (9375): Add STB0899 support") Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent 50b9fa7 commit 2d86197

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/dvb-frontends/stb0899_algo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
269269

270270
short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3;
271271
int index = 0;
272-
u8 cfr[2];
272+
u8 cfr[2] = {0};
273273
u8 reg;
274274

275275
internal->status = NOCARRIER;

0 commit comments

Comments
 (0)