From: Michael Krufky Date: Sun, 14 Oct 2007 21:11:53 +0000 (-0300) Subject: V4L/DVB (6326): tuner-core.c: fe_has_signal() can return uninitialized value X-Git-Tag: firefly_0821_release~24682^2~28 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1419683d85367df90079fb5535865ac0841ebbea;p=firefly-linux-kernel-4.4.55.git V4L/DVB (6326): tuner-core.c: fe_has_signal() can return uninitialized value Initialize strength to zero. Thanks to Adrian Bunk, who spotted this with the Coverity checker. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 94843086cda9..6a777604f070 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -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);