diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2017-01-05 15:34:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-07 05:19:42 +0300 |
commit | b3ddb091c77fae247b98b167e306da5b768ad612 (patch) | |
tree | 16b2dba78b5b730a242bb9f6a4bd776ccc449ace | |
parent | 407669f2c9fe9f32aeb39f715d748fe456718aac (diff) | |
download | linux-b3ddb091c77fae247b98b167e306da5b768ad612.tar.xz |
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>
-rw-r--r-- | drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c index 8001cde1db1e..503135a4f47a 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c @@ -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; } |