3.18-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andrzej Hajda <[email protected]>

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 <[email protected]>
Signed-off-by: Andrzej Hajda <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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 s5c73m
        }
 
        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;
 }


Reply via email to