From: Roel Kluin Date: Thu, 11 Jun 2009 14:28:17 +0000 (-0300) Subject: V4L/DVB (11961): tvp514x: try_count off by one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76b08116458c4dbc1e1c40f78bc087fc4f3c8969;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;