with while (try_count-- > 0) { ... } try_count reaches 0, not -1.

Signed-off-by: Roel Kluin <[email protected]>
---
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c
index 8e23aa5..5f4cbc2 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to