]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
V4L: cx88-blackbird: fix vidioc_g_tuner never ending list of tuners
authorJelle Foks <jelle@foks.8m.com>
Tue, 10 Jul 2007 04:03:02 +0000 (00:03 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 4 Aug 2007 16:10:26 +0000 (09:10 -0700)
v4l-info and other programs would loop indefinitely while querying the
tuners for cx88-blackbird cards.

The cause was that vidioc_g_tuner didn't return an error value for
qctrl->id != 0, making the application think there is a never ending
list of tuners...

This patch adds the same index check as done in vidioc_g_tuner() in
cx88-video.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/cx88/cx88-blackbird.c

index b0466b88f52cd209680ee1a52c3aa9eacf3319f6..a80b1cb1abe88999c0074e2f949f83b4ce510d32 100644 (file)
@@ -1034,6 +1034,8 @@ static int vidioc_g_tuner (struct file *file, void *priv,
 
        if (unlikely(UNSET == core->tuner_type))
                return -EINVAL;
+       if (0 != t->index)
+               return -EINVAL;
 
        strcpy(t->name, "Television");
        t->type       = V4L2_TUNER_ANALOG_TV;