From: Roel Kluin Date: Mon, 9 Feb 2009 21:57:06 +0000 (-0300) Subject: V4L/DVB (10629): tvp514x: try_count reaches 0, not -1 X-Git-Tag: v2.6.30-rc1~621^2~489 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=320a46485c83e70e374afa8bdfe8cd39a801cd5d;p=~emulex%2Finfiniband.git V4L/DVB (10629): tvp514x: try_count reaches 0, not -1 with while (try_count-- > 0) { ... } try_count reaches 0, not -1. Cc: Vaibhav Hiremath Signed-off-by: Roel Kluin Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c index 8e23aa53c29..5f4cbc2b23c 100644 --- a/drivers/media/video/tvp514x.c +++ b/drivers/media/video/tvp514x.c @@ -686,7 +686,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;