Skip to content

Commit

Permalink
[media] m5mols: Fix logic in sanity check
Browse files Browse the repository at this point in the history
Detected by "cppcheck".

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Thomas Jarosch authored and Mauro Carvalho Chehab committed Dec 11, 2011
1 parent 5eefb4f commit a32390d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/m5mols/m5mols_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a32390d

Please sign in to comment.