[PATCH] V4L/DVB: &&/|| confusion in medusa_set_decoderduration()
From: roel kluin
Date: Sat Jan 01 2011 - 10:36:38 EST
Since VDEC_A is defined less than VDEC_H the if-branch was always taken.
Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/