diff --git a/patches.kernel.org/6.2.2-001-ALSA-hda-cs35l41-Correct-error-condition-handli.patch b/patches.kernel.org/6.2.2-001-ALSA-hda-cs35l41-Correct-error-condition-handli.patch new file mode 100644 index 0000000..e58d1c6 --- /dev/null +++ b/patches.kernel.org/6.2.2-001-ALSA-hda-cs35l41-Correct-error-condition-handli.patch @@ -0,0 +1,45 @@ +From: Vitaly Rodionov +Date: Mon, 13 Feb 2023 14:50:06 +0000 +Subject: [PATCH] ALSA: hda: cs35l41: Correct error condition handling +References: bsc#1012628 +Patch-mainline: 6.2.2 +Git-commit: 943f4e64ee177cf44d7f2c235281fcda7c32bb28 + +commit 943f4e64ee177cf44d7f2c235281fcda7c32bb28 upstream. + +Function cs_dsp_coeff_write_ctrl() can return 3 possible values: +0 - no change, 1 - value has changed and -1 - error, so positive value +is not an error. +Fixes: 7406bdbc4fb8 ("ASoC: wm_adsp: Return whether changed when writing controls") + +Signed-off-by: Vitaly Rodionov +Signed-off-by: Stefan Binding +Link: https://lore.kernel.org/r/20230213145008.1215849-2-sbinding@opensource.cirrus.com +Signed-off-by: Takashi Iwai +Cc: Richard Fitzgerald +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Jiri Slaby +--- + sound/pci/hda/hda_cs_dsp_ctl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/hda/hda_cs_dsp_ctl.c b/sound/pci/hda/hda_cs_dsp_ctl.c +index 5433f622..463ca060 100644 +--- a/sound/pci/hda/hda_cs_dsp_ctl.c ++++ b/sound/pci/hda/hda_cs_dsp_ctl.c +@@ -218,10 +218,10 @@ int hda_cs_dsp_write_ctl(struct cs_dsp *dsp, const char *name, int type, + cs_ctl = cs_dsp_get_ctl(dsp, name, type, alg); + ret = cs_dsp_coeff_write_ctrl(cs_ctl, 0, buf, len); + mutex_unlock(&dsp->pwr_lock); +- if (ret) ++ if (ret < 0) + return ret; + +- if (cs_ctl->flags & WMFW_CTL_FLAG_SYS) ++ if (ret == 0 || (cs_ctl->flags & WMFW_CTL_FLAG_SYS)) + return 0; + + ctl = cs_ctl->priv; +-- +2.35.3 + diff --git a/series.conf b/series.conf index e41567b..8947bac 100644 --- a/series.conf +++ b/series.conf @@ -40,6 +40,7 @@ patches.kernel.org/6.2.1-011-randstruct-disable-Clang-15-support.patch patches.kernel.org/6.2.1-012-bpf-add-missing-header-file-include.patch patches.kernel.org/6.2.1-013-Linux-6.2.1.patch + patches.kernel.org/6.2.2-001-ALSA-hda-cs35l41-Correct-error-condition-handli.patch ######################################################## # Build fixes that apply to the vanilla kernel too.