diff options
author | Yan Lei <yan_lei@dahuatech.com> | 2022-04-10 02:58:54 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-04-24 08:49:53 +0100 |
commit | f83bd49cbc373983ba79bf4cd55fb6bff7901d36 (patch) | |
tree | 4dd315acc7a0a40cfbbfa2ead258a1b7247e501e /drivers/media/v4l2-core | |
parent | 03b49ec8715a99192c35dfa86bdd31b61fbf303e (diff) | |
download | lwn-f83bd49cbc373983ba79bf4cd55fb6bff7901d36.tar.gz lwn-f83bd49cbc373983ba79bf4cd55fb6bff7901d36.zip |
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: Yan Lei <yan_lei@dahuatech.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/tuner-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index ad9224a18853..2d47c10de062 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c @@ -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 = |