public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] v4l/tvp514x: try_count reaches 0, not -1
@ 2009-02-09 21:57 Roel Kluin
  2009-02-10  4:18 ` Hiremath, Vaibhav
  2009-02-10  9:20 ` Roel Kluin
  0 siblings, 2 replies; 3+ messages in thread
From: Roel Kluin @ 2009-02-09 21:57 UTC (permalink / raw)
  To: hvaibhav, mchehab; +Cc: linux-media, video4linux-list

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

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-10  9:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 21:57 [PATCH] v4l/tvp514x: try_count reaches 0, not -1 Roel Kluin
2009-02-10  4:18 ` Hiremath, Vaibhav
2009-02-10  9:20 ` Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox