Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}