* [PATCH] Fix logic in sanity check
@ 2011-10-15 21:36 Thomas Jarosch
0 siblings, 0 replies; only message in thread
From: Thomas Jarosch @ 2011-10-15 21:36 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media
Detected by "cppcheck".
---
drivers/media/video/m5mols/m5mols_core.c | 2 +-
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 fb8e4a7..e485e9e 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, ®);
--
1.7.6.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-15 21:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15 21:36 [PATCH] Fix logic in sanity check Thomas Jarosch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.