From 94af1b63d866289aabad0514f5c8ecf223f502fb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 29 Oct 2012 07:58:59 -0200 Subject: [PATCH] [media] drxk_hard: fix the return code from an error handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit While it is very unlikely, if the number of parameters for QAMDemodulatorCommand is not 2 or 4, status become undefined: /home/hans/work/build/v4l-dvb-git/drivers/media/dvb-frontends/drxk_hard.c: In function ‘QAMDemodulatorCommand’: /home/hans/work/build/v4l-dvb-git/drivers/media/dvb-frontends/drxk_hard.c:5452:5: warning: ‘status’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/drxk_hard.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 59382fbb3286..76a4e5cf8730 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -5446,6 +5446,7 @@ static int QAMDemodulatorCommand(struct drxk_state *state, } else { printk(KERN_WARNING "drxk: Unknown QAM demodulator parameter " "count %d\n", numberOfParameters); + status = -EINVAL; } error: -- 2.20.1