From: Thomas Jarosch Date: Sat, 15 Oct 2011 21:38:40 +0000 (-0300) Subject: [media] m5mols: Fix logic in sanity check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a32390d808b5b7a6b1c7f9236673c917b4733f13;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [media] m5mols: Fix logic in sanity check Detected by "cppcheck". Signed-off-by: Thomas Jarosch Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/m5mols/m5mols_core.c b/drivers/media/video/m5mols/m5mols_core.c index 68497f8ddcd9..5da8d74df508 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, ®);