提交 a32390d8 编写于 作者: T Thomas Jarosch 提交者: Mauro Carvalho Chehab

[media] m5mols: Fix logic in sanity check

Detected by "cppcheck".
Signed-off-by: NThomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 5eefb4f0
...@@ -333,7 +333,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode) ...@@ -333,7 +333,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode)
int ret = -EINVAL; int ret = -EINVAL;
u8 reg; u8 reg;
if (mode < REG_PARAMETER && mode > REG_CAPTURE) if (mode < REG_PARAMETER || mode > REG_CAPTURE)
return ret; return ret;
ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg); ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册