From: Roel Kluin <roel.kl...@gmail.com>

With `while (try_count-- > 0)' try_count reaches -1 after the loop.

Signed-off-by: Roel Kluin <roel.kl...@gmail.com>
Cc: Mauro Carvalho Chehab <mche...@infradead.org>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
---

 drivers/media/video/tvp514x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/media/video/tvp514x.c~tvp514x-try_count-off-by-one 
drivers/media/video/tvp514x.c
--- a/drivers/media/video/tvp514x.c~tvp514x-try_count-off-by-one
+++ a/drivers/media/video/tvp514x.c
@@ -692,7 +692,7 @@ static int ioctl_s_routing(struct v4l2_i
                        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;
_
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to