]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6326): tuner-core.c: fe_has_signal() can return uninitialized value
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 14 Oct 2007 21:11:53 +0000 (18:11 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 22 Oct 2007 14:01:39 +0000 (12:01 -0200)
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>
drivers/media/video/tuner-core.c

index 94843086cda90f41f32e2b876b23b0e63908abb9..6a777604f0708d36570a74fd96c704ec71fa3733 100644 (file)
@@ -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);