Skip to content

Commit

Permalink
[media] drxk_hard: fix the return code from an error handler
Browse files Browse the repository at this point in the history
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 <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 29, 2012
1 parent 3fac4eb commit 94af1b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/dvb-frontends/drxk_hard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 94af1b6

Please sign in to comment.