提交 a2370ba2 编写于 作者: A Andrzej Hajda 提交者: Mauro Carvalho Chehab

[media] v4l: s5c73m3: fix negation operator

Bool values should be negated using logical operators. Using bitwise operators
results in unexpected and possibly incorrect results.
Reported-by: NDavid Binderman <dcb314@hotmail.com>
Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 21b5a1c3
......@@ -211,7 +211,7 @@ static int s5c73m3_3a_lock(struct s5c73m3 *state, struct v4l2_ctrl *ctrl)
}
if ((ctrl->val ^ ctrl->cur.val) & V4L2_LOCK_FOCUS)
ret = s5c73m3_af_run(state, ~af_lock);
ret = s5c73m3_af_run(state, !af_lock);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册