[PATCH] Fix logic in sanity check

Thomas Jarosch thomas.jarosch at intra2net.com
Sat Oct 15 21:39:28 UTC 2011


Detected by "cppcheck"

Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>
---
 drivers/staging/cx25821/cx25821-medusa-video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/cx25821/cx25821-medusa-video.c b/drivers/staging/cx25821/cx25821-medusa-video.c
index fc780d0..a084961 100644
--- a/drivers/staging/cx25821/cx25821-medusa-video.c
+++ b/drivers/staging/cx25821/cx25821-medusa-video.c
@@ -565,7 +565,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;
 	}
-- 
1.7.6.4




More information about the devel mailing list