summaryrefslogtreecommitdiff
path: root/drivers/media/video/m5mols
diff options
context:
space:
mode:
authorThomas Jarosch <thomas.jarosch@intra2net.com>2011-10-15 21:38:40 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-11 14:08:21 (GMT)
commita32390d808b5b7a6b1c7f9236673c917b4733f13 (patch)
treefdb29aab6f5a46f991222c753910f8d63a2da690 /drivers/media/video/m5mols
parent5eefb4f09bd8b250421fbd055e67d136d57f4030 (diff)
downloadlinux-fsl-qoriq-a32390d808b5b7a6b1c7f9236673c917b4733f13.tar.xz
[media] m5mols: Fix logic in sanity check
Detected by "cppcheck". Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/m5mols')
-rw-r--r--drivers/media/video/m5mols/m5mols_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/m5mols/m5mols_core.c b/drivers/media/video/m5mols/m5mols_core.c
index 68497f8..5da8d74 100644
--- a/drivers/media/video/m5mols/m5mols_core.c
+++ b/drivers/media/video/m5mols/m5mols_core.c
@@ -333,7 +333,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode)
int ret = -EINVAL;
u8 reg;
- if (mode < REG_PARAMETER && mode > REG_CAPTURE)
+ if (mode < REG_PARAMETER || mode > REG_CAPTURE)
return ret;
ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg);