提交 1a002ebf 编写于 作者: C Cyrill Gorcunov 提交者: Mauro Carvalho Chehab

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

We should check for proper index first
Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册