From 496c43ff9539998bd6f81127eed8ff466358bb96 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 Aug 2017 10:18:15 -0700 Subject: [PATCH] 3.18-stable patches added patches: v4l-s5c73m3-fix-negation-operator.patch --- queue-3.18/series | 1 + .../v4l-s5c73m3-fix-negation-operator.patch | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 queue-3.18/v4l-s5c73m3-fix-negation-operator.patch diff --git a/queue-3.18/series b/queue-3.18/series index 075f5374eeb..c1ebb5e9a2f 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -30,3 +30,4 @@ sh_eth-fix-ethtool-operation-crash-when-net-device-is-down.patch net-sched-fix-soft-lockup-in-tc_classify.patch ipmi-watchdog-fix-watchdog-timeout-set-on-reboot.patch dentry-name-snapshots.patch +v4l-s5c73m3-fix-negation-operator.patch diff --git a/queue-3.18/v4l-s5c73m3-fix-negation-operator.patch b/queue-3.18/v4l-s5c73m3-fix-negation-operator.patch new file mode 100644 index 00000000000..86740adc36a --- /dev/null +++ b/queue-3.18/v4l-s5c73m3-fix-negation-operator.patch @@ -0,0 +1,33 @@ +From a2370ba2752538404e363346b339869c9973aeac Mon Sep 17 00:00:00 2001 +From: Andrzej Hajda +Date: Thu, 5 Jan 2017 10:34:07 -0200 +Subject: [media] v4l: s5c73m3: fix negation operator + +From: Andrzej Hajda + +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 +Signed-off-by: Andrzej Hajda +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + } -- 2.47.3