Commit 1a002ebf authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Mauro Carvalho Chehab

V4L/DVB (7461): bttv: fix missed index check

We should check for proper index first
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent c1379189
......@@ -3518,8 +3518,12 @@ static int radio_enum_input(struct file *file, void *priv,
static int radio_g_audio(struct file *file, void *priv,
struct v4l2_audio *a)
{
if (a->index != 0)
return -EINVAL;
memset(a, 0, sizeof(*a));
strcpy(a->name, "Radio");
return 0;
}
......
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