Browse Source

[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>
Thomas Jarosch 13 years ago
parent
commit
a32390d808
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/media/video/m5mols/m5mols_core.c

+ 1 - 1
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);