diff options
author | Jelle Foks <jelle@foks.8m.com> | 2007-05-21 13:56:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-03 14:11:16 -0400 |
commit | f057131fb6eb2c45f6023e3da41ccd6e4e71aee9 (patch) | |
tree | 7b01a33943d42bebc1a4fed50fa90005fe65dd26 /drivers | |
parent | 333408f21590d50397f3004e3f87070fa8f52c51 (diff) |
V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tuners
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index b0466b88f52c..a80b1cb1abe8 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -1034,6 +1034,8 @@ static int vidioc_g_tuner (struct file *file, void *priv, | |||
1034 | 1034 | ||
1035 | if (unlikely(UNSET == core->tuner_type)) | 1035 | if (unlikely(UNSET == core->tuner_type)) |
1036 | return -EINVAL; | 1036 | return -EINVAL; |
1037 | if (0 != t->index) | ||
1038 | return -EINVAL; | ||
1037 | 1039 | ||
1038 | strcpy(t->name, "Television"); | 1040 | strcpy(t->name, "Television"); |
1039 | t->type = V4L2_TUNER_ANALOG_TV; | 1041 | t->type = V4L2_TUNER_ANALOG_TV; |