V4L/DVB (7461): bttv: fix missed index check
We should check for proper index first Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
c137918978
commit
1a002ebf60
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue