public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: roel kluin <roel.kluin@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	mchehab@redhat.com
Subject: [PATCH] V4L/DVB: &&/|| confusion in medusa_set_decoderduration()
Date: Sat, 01 Jan 2011 16:36:23 +0100	[thread overview]
Message-ID: <4D1F49F7.7010401@gmail.com> (raw)

Since VDEC_A is defined less than VDEC_H the if-branch was always taken.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/staging/cx25821/cx25821-medusa-video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

See drivers/staging/cx25821/cx25821-medusa-defines.h:27 for VDEC_* definitions:
#define VDEC_A		0
...
#define VDEC_H		7

diff --git a/drivers/staging/cx25821/cx25821-medusa-video.c b/drivers/staging/cx25821/cx25821-medusa-video.c
index 1e11e0c..00fb56f 100644
--- a/drivers/staging/cx25821/cx25821-medusa-video.c
+++ b/drivers/staging/cx25821/cx25821-medusa-video.c
@@ -564,7 +564,7 @@ static void medusa_set_decoderduration(struct cx25821_dev *dev, int decoder,
 	mutex_lock(&dev->lock);
 
 	/* no support */
-	if (decoder < VDEC_A && decoder > VDEC_H) {
+	if (decoder < VDEC_A || decoder > VDEC_H) {
 		mutex_unlock(&dev->lock);
 		return;
 	}

                 reply	other threads:[~2011-01-01 15:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4D1F49F7.7010401@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@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