summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-06-11 16:28:17 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-17 00:07:39 +0200
commit76b08116458c4dbc1e1c40f78bc087fc4f3c8969 (patch)
tree3848d794b5965e41d4f8f8e923b5a628b6caa3b8
parentV4L/DVB (11960): v4l: generate KEY_CAMERA instead of BTN_0 key events on inpu... (diff)
downloadlinux-76b08116458c4dbc1e1c40f78bc087fc4f3c8969.tar.xz
linux-76b08116458c4dbc1e1c40f78bc087fc4f3c8969.zip
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 <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>
-rw-r--r--drivers/media/video/tvp514x.c2
1 files changed, 1 insertions, 1 deletions
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;