[media] cx25821,medusa: incorrect check on decoder type
authorAlan Cox <[email protected]>
Tue, 24 Jul 2012 15:00:24 +0000 (12:00 -0300)
committerMauro Carvalho Chehab <[email protected]>
Tue, 31 Jul 2012 00:02:35 +0000 (21:02 -0300)
Unsupported requests should be ignored but in fact affected VDEC_A

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44051

Reported-by: [email protected]
Signed-off-by: Alan Cox <[email protected]>
Cc: Palash Bandyopadhyay <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/video/cx25821/cx25821-medusa-video.c

index 313fb20a0b47a01b1094e45d227d382a9f2ad296..6a92e5c70c2a95b10d16e57cfea87e2651f77069 100644 (file)
@@ -499,7 +499,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;
        }