aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGravatar Cyrill Gorcunov <gorcunov@gmail.com> 2008-04-01 17:49:13 -0300
committerGravatar Mauro Carvalho Chehab <mchehab@infradead.org> 2008-04-01 19:35:45 -0300
commit1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95 (patch)
treeede91daf700a989446a072124f11eb837e83d666 /drivers
parentV4L/DVB (7400): bttv: Add a radio compat_ioctl file operation (diff)
downloadlinux-1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95.tar.gz
linux-1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95.tar.bz2
linux-1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95.zip
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')
-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 e68326f28097..fcf8f2d208a8 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;
}