Commit f83bd49c authored by Yan Lei's avatar Yan Lei Committed by Mauro Carvalho Chehab

media: v4l2: fix uninitialized value tuner_status(CWE-457)

Declaring variable "tuner_status" without initializer.
Using uninitialized value "tuner_status" when calling
"*fe_tuner_ops->get_status".
(The function pointer resolves to "cx24113_get_status".)
Signed-off-by: default avatarYan Lei <yan_lei@dahuatech.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 03b49ec8
......@@ -1118,7 +1118,7 @@ static void tuner_status(struct dvb_frontend *fe)
if (t->mode != V4L2_TUNER_RADIO)
return;
if (fe_tuner_ops->get_status) {
u32 tuner_status;
u32 tuner_status = 0;
fe_tuner_ops->get_status(&t->fe, &tuner_status);
if (tuner_status & TUNER_STATUS_LOCKED)
......@@ -1258,7 +1258,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
if (vt->type == t->mode) {
vt->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
if (fe_tuner_ops->get_status) {
u32 tuner_status;
u32 tuner_status = 0;
fe_tuner_ops->get_status(&t->fe, &tuner_status);
vt->rxsubchans =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment