summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-04-01 22:49:13 +0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-02 00:35:45 +0200
commit1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95 (patch)
treeede91daf700a989446a072124f11eb837e83d666 /drivers
parentV4L/DVB (7400): bttv: Add a radio compat_ioctl file operation (diff)
downloadlinux-1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95.tar.xz
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;
}