From: Andrey Karelin <a.karelin@ideco.ru>
To: Srinivas Kandagatla <srini@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: Andrey Karelin <a.karelin@ideco.ru>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Neil Armstrong <neil.armstrong@linaro.org>,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: [PATCH 1/2] ASoC: codecs: wsa881x: propagate sdw_write() error from bus_config
Date: Fri, 16 Oct 2026 19:33:35 +0500 [thread overview]
Message-ID: <20261016143341.417876-2-a.karelin@ideco.ru> (raw)
In-Reply-To: <20261016143341.417876-1-a.karelin@ideco.ru>
wsa881x_bus_config() programs the clock divider for the next bank via
sdw_write() but ignores its result and always returns 0. A failed write
is therefore hidden from sdw_notify_config(), which aborts programming
of the stream parameters when a bus_config callback fails, and the
amplifier may keep running with a wrong clock configuration after the
bank switch.
Return the result of sdw_write() instead.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support")
Signed-off-by: Andrey Karelin <a.karelin@ideco.ru>
---
sound/soc/codecs/wsa881x.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index 47ac3e4985a5..0fc7132c0a9c 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -1093,10 +1093,8 @@ static int wsa881x_port_prep(struct sdw_slave *slave,
static int wsa881x_bus_config(struct sdw_slave *slave,
struct sdw_bus_params *params)
{
- sdw_write(slave, SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(params->next_bank),
- 0x01);
-
- return 0;
+ return sdw_write(slave, SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(params->next_bank),
+ 0x01);
}
static const struct sdw_slave_ops wsa881x_slave_ops = {
--
2.56.0
next prev parent reply other threads:[~2026-10-16 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 14:33 [PATCH 0/2] ASoC: codecs: propagate sdw_write() errors from bus_config callbacks Andrey Karelin
2026-10-16 14:33 ` Andrey Karelin [this message]
2026-10-16 14:33 ` [PATCH 2/2] ASoC: codecs: wcd-common: propagate sdw_write() error from bus_config Andrey Karelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016143341.417876-2-a.karelin@ideco.ru \
--to=a.karelin@ideco.ru \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®