From 76b08116458c4dbc1e1c40f78bc087fc4f3c8969 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Thu, 11 Jun 2009 11:28:17 -0300 Subject: [PATCH] V4L/DVB (11961): tvp514x: try_count off by one With `while (try_count-- > 0)' try_count reaches -1 after the loop. Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tvp514x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c index 4262e60b8116..3750f7fadb12 100644 --- a/drivers/media/video/tvp514x.c +++ b/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; -- 2.34.1