Skip to content

Commit

Permalink
V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Michael Krufky <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
Jelle Foks authored and mchehab committed Jul 3, 2007
1 parent 333408f commit f057131
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/cx88/cx88-blackbird.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f057131

Please sign in to comment.