From 95a8589d453617556e56dfc53de6f18da19863a5 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 11 Jun 2009 11:28:17 -0300 Subject: tvp514x: try_count off by one From: Roel Kluin With `while (try_count-- > 0)' try_count reaches -1 after the loop. Priority: normal Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Douglas Schilling Landgraf --- linux/drivers/media/video/tvp514x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/tvp514x.c b/linux/drivers/media/video/tvp514x.c index 4262e60b8..3750f7fad 100644 --- a/linux/drivers/media/video/tvp514x.c +++ b/linux/drivers/media/video/tvp514x.c @@ -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; -- cgit v1.2.3