V4L/DVB: &&/|| confusion in medusa_set_decoderduration()
PATCH 1/1 V4L/DVB: &&/|| confusion in medusa_set_decoderduration()
Since VDEC_A is defined less than VDEC_H the if-branch was always taken.
Signed-off-by Roel Kluin <[email protected]>
--- 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
drivers/staging/cx25821/cx25821-medusa-video.c +1 -1
@@ -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 ; }