public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] V4L/DVB: &&/|| confusion in medusa_set_decoderduration()
@ 2011-01-01 15:36 roel kluin
  0 siblings, 0 replies; only message in thread
From: roel kluin @ 2011-01-01 15:36 UTC (permalink / raw)
  To: Andrew Morton, LKML, mchehab

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;
 	}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-01 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-01 15:36 [PATCH] V4L/DVB: &&/|| confusion in medusa_set_decoderduration() roel kluin

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