Skip to content

Commit

Permalink
V4L/DVB (6326): tuner-core.c: fe_has_signal() can return uninitialize…
Browse files Browse the repository at this point in the history
…d value

Initialize strength to zero.

Thanks to Adrian Bunk, who spotted this with the Coverity checker.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Oct 22, 2007
1 parent fcf94c8 commit 1419683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void fe_standby(struct tuner *t)
static int fe_has_signal(struct tuner *t)
{
struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
u16 strength;
u16 strength = 0;

if (fe_tuner_ops->get_rf_strength)
fe_tuner_ops->get_rf_strength(&t->fe, &strength);
Expand Down

0 comments on commit 1419683

Please sign in to comment.