public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Roel Kluin <roel.kluin@gmail.com>
To: hvaibhav@ti.com, mchehab@redhat.com
Cc: linux-media@vger.kernel.org, video4linux-list@redhat.com
Subject: [PATCH] v4l/tvp514x: try_count reaches 0, not -1
Date: Mon, 09 Feb 2009 22:57:06 +0100	[thread overview]
Message-ID: <4990A6B2.1080902@gmail.com> (raw)

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;

             reply	other threads:[~2009-02-09 21:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 21:57 Roel Kluin [this message]
2009-02-10  4:18 ` [PATCH] v4l/tvp514x: try_count reaches 0, not -1 Hiremath, Vaibhav
2009-02-10  9:20 ` Roel Kluin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4990A6B2.1080902@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox