Skip to content

Commit

Permalink
V4L/DVB (11961): tvp514x: try_count off by one
Browse files Browse the repository at this point in the history
With `while (try_count-- > 0)' try_count reaches -1 after the loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
RoelKluin authored and Mauro Carvalho Chehab committed Jun 16, 2009
1 parent bcd3e4b commit 76b0811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/tvp514x.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ static int ioctl_s_routing(struct v4l2_int_device *s,
break; /* Input detected */
}

if ((current_std == STD_INVALID) || (try_count <= 0))
if ((current_std == STD_INVALID) || (try_count < 0))
return -EINVAL;

decoder->current_std = current_std;
Expand Down

0 comments on commit 76b0811

Please sign in to comment.