From fa16897a6630141ffed8a61a28d9c83e5c87cb4e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 4 Mar 2024 12:48:42 +0100 Subject: [PATCH] 6.7-stable patches added patches: asoc-cs35l56-fix-reversed-if-statement-in-cs35l56_dspwait_asp1tx_put.patch --- ...tement-in-cs35l56_dspwait_asp1tx_put.patch | 35 +++++++++++++++++++ queue-6.7/series | 1 + 2 files changed, 36 insertions(+) create mode 100644 queue-6.7/asoc-cs35l56-fix-reversed-if-statement-in-cs35l56_dspwait_asp1tx_put.patch diff --git a/queue-6.7/asoc-cs35l56-fix-reversed-if-statement-in-cs35l56_dspwait_asp1tx_put.patch b/queue-6.7/asoc-cs35l56-fix-reversed-if-statement-in-cs35l56_dspwait_asp1tx_put.patch new file mode 100644 index 00000000000..15a6810ef46 --- /dev/null +++ b/queue-6.7/asoc-cs35l56-fix-reversed-if-statement-in-cs35l56_dspwait_asp1tx_put.patch @@ -0,0 +1,35 @@ +From 4703b014f28bf7a2e56d1da238ee95ef6c5ce76b Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Mon, 5 Feb 2024 15:44:30 +0300 +Subject: ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put() + +From: Dan Carpenter + +commit 4703b014f28bf7a2e56d1da238ee95ef6c5ce76b upstream. + +It looks like the "!" character was added accidentally. The +regmap_update_bits_check() function is normally going to succeed. This +means the rest of the function is unreachable and we don't handle the +situation where "changed" is true correctly. + +Fixes: 07f7d6e7a124 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers") +Signed-off-by: Dan Carpenter +Reviewed-by: Richard Fitzgerald +Link: https://lore.kernel.org/r/0c254c07-d1c0-4a5c-a22b-7e135cab032c@moroto.mountain +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/codecs/cs35l56.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/cs35l56.c ++++ b/sound/soc/codecs/cs35l56.c +@@ -175,7 +175,7 @@ static int cs35l56_dspwait_asp1tx_put(st + + ret = regmap_update_bits_check(cs35l56->base.regmap, addr, + CS35L56_ASP_TXn_SRC_MASK, val, &changed); +- if (!ret) ++ if (ret) + return ret; + + if (changed) diff --git a/queue-6.7/series b/queue-6.7/series index d624b00b1bf..5e327125cdb 100644 --- a/queue-6.7/series +++ b/queue-6.7/series @@ -132,3 +132,4 @@ mfd-twl6030-irq-revert-to-use-of_match_device.patch nfs-fix-data-corruption-caused-by-congestion.patch af_unix-fix-task-hung-while-purging-oob_skb-in-gc.patch af_unix-drop-oob_skb-ref-before-purging-queue-in-gc.patch +asoc-cs35l56-fix-reversed-if-statement-in-cs35l56_dspwait_asp1tx_put.patch -- 2.47.3