summaryrefslogtreecommitdiffstats
path: root/drivers/media
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
parentc137918978889fa4711d286e0a8ca3d93fdcb991 (diff)
downloadop-kernel-dev-1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95.zip
op-kernel-dev-1a002ebf60c011ed6574b8e3ed9aa85f1ead6a95.tar.gz
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')
-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 e68326f..fcf8f2d 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;
}
OpenPOWER on IntegriCloud