]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7461): bttv: fix missed index check
authorCyrill Gorcunov <gorcunov@gmail.com>
Tue, 1 Apr 2008 20:49:13 +0000 (17:49 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 1 Apr 2008 22:35:45 +0000 (19:35 -0300)
We should check for proper index first

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/bt8xx/bttv-driver.c

index e68326f28097f78d973d862c25ec0c83f2019085..fcf8f2d208a843890df86252ee7579f52cfb385e 100644 (file)
@@ -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;
 }