Skip to contentSkip to conversation

Patch "[media] v4l: s5c73m3: fix negation operator" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Aug 4, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

[media] v4l: s5c73m3: fix negation operator

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     v4l-s5c73m3-fix-negation-operator.patch

and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a2370ba2752538404e363346b339869c9973aeac Mon Sep 17 00:00:00 2001

From: Andrzej Hajda <[email protected]>
Date: Thu, 5 Jan 2017 10:34:07 -0200
Subject: [media] v4l: s5c73m3: fix negation operator

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.

---
 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c +1 -1
@@ -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;
 }

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/v4l-s5c73m3-fix-negation-operator.patch