Skip to content

Commit b3ddb09

Browse files
Andrzej Hajdagregkh
authored andcommitted
v4l: s5c73m3: fix negation operator
commit a2370ba2752538404e363346b339869c9973aeac upstream. Bool values should be negated using logical operators. Using bitwise operators results in unexpected and possibly incorrect results. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 407669f commit b3ddb09

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static int s5c73m3_3a_lock(struct s5c73m3 *state, struct v4l2_ctrl *ctrl)
211211
}
212212

213213
if ((ctrl->val ^ ctrl->cur.val) & V4L2_LOCK_FOCUS)
214-
ret = s5c73m3_af_run(state, ~af_lock);
214+
ret = s5c73m3_af_run(state, !af_lock);
215215

216216
return ret;
217217
}

0 commit comments

Comments
 (0)