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

We should check for proper index first

Signed-off-by: Cyrill Gorcunov <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Cyrill Gorcunov 2008-04-01 17:49:13 -03:00 • committed by Mauro Carvalho Chehab
commit 1a002ebf60

View file

@ -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;
}