aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/bt8xx
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-04-01 17:49:13 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-01 19:35:45 -0300
commit1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95 (patch)
treeede91daf700a989446a072124f11eb837e83d666 /drivers/media/video/bt8xx
parentc137918978889fa4711d286e0a8ca3d93fdcb991 (diff)
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>
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index e68326f2809..fcf8f2d208a 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -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;
}