* [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: check clk_set_rate() return value
@ 2026-07-15 11:55 Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 1/2] ASoC: codecs: lpass-wsa-macro: " Ajay Kumar Nandam
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ajay Kumar Nandam @ 2026-07-15 11:55 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-sound, linux-arm-msm, linux-kernel, Ajay Kumar Nandam,
Konrad Dybcio
clk_set_rate() returns 0 on success or a negative errno on failure but
the WSA and VA macro probe functions are ignoring it. This series adds
return value checking and bails out of probe on failure.
This mirrors the same fix already posted for the TX and RX macros [1].
[1] https://lore.kernel.org/all/20260707-xo-sd-codec-tx-rx-v2-3-f61b4622f97f@oss.qualcomm.com/
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
---
Changes in v2:
- Use present tense in commit messages
- Carry Reviewed-by tag from Konrad
- Link to v1: https://patch.msgid.link/20260715-xo-sd-codec-wsa-va-clk-set-rate-v1-0-f0c713ff0b4e@oss.qualcomm.com
---
Ajay Kumar Nandam (2):
ASoC: codecs: lpass-wsa-macro: check clk_set_rate() return value
ASoC: codecs: lpass-va-macro: check clk_set_rate() return value
sound/soc/codecs/lpass-va-macro.c | 8 ++++++--
sound/soc/codecs/lpass-wsa-macro.c | 9 +++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
---
base-commit: cc2b5f627e8ccbae1188ef2d8be3e451d7f933a5
change-id: 20260715-xo-sd-codec-wsa-va-clk-set-rate-1f66a64165b9
Best regards,
--
Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] ASoC: codecs: lpass-wsa-macro: check clk_set_rate() return value
2026-07-15 11:55 [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: check clk_set_rate() return value Ajay Kumar Nandam
@ 2026-07-15 11:55 ` Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 2/2] ASoC: codecs: lpass-va-macro: " Ajay Kumar Nandam
2026-07-15 13:45 ` [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: " Cezary Rojewski
2 siblings, 0 replies; 4+ messages in thread
From: Ajay Kumar Nandam @ 2026-07-15 11:55 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-sound, linux-arm-msm, linux-kernel, Ajay Kumar Nandam,
Konrad Dybcio
clk_set_rate() returns 0 on success or a negative errno on failure but
the WSA macro probe function is ignoring it. Check the return value and
bail out of probe on failure.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
---
sound/soc/codecs/lpass-wsa-macro.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
index f511816aa4a0..fc9e0a37c042 100644
--- a/sound/soc/codecs/lpass-wsa-macro.c
+++ b/sound/soc/codecs/lpass-wsa-macro.c
@@ -2773,8 +2773,13 @@ static int wsa_macro_probe(struct platform_device *pdev)
wsa->dev = dev;
/* set MCLK and NPL rates */
- clk_set_rate(wsa->mclk, WSA_MACRO_MCLK_FREQ);
- clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ);
+ ret = clk_set_rate(wsa->mclk, WSA_MACRO_MCLK_FREQ);
+ if (ret)
+ return ret;
+
+ ret = clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ);
+ if (ret)
+ return ret;
ret = devm_pm_clk_create(dev);
if (ret)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] ASoC: codecs: lpass-va-macro: check clk_set_rate() return value
2026-07-15 11:55 [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: check clk_set_rate() return value Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 1/2] ASoC: codecs: lpass-wsa-macro: " Ajay Kumar Nandam
@ 2026-07-15 11:55 ` Ajay Kumar Nandam
2026-07-15 13:45 ` [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: " Cezary Rojewski
2 siblings, 0 replies; 4+ messages in thread
From: Ajay Kumar Nandam @ 2026-07-15 11:55 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-sound, linux-arm-msm, linux-kernel, Ajay Kumar Nandam,
Konrad Dybcio
clk_set_rate() returns 0 on success or a negative errno on failure but
the VA macro probe function is ignoring it. Check the return value and
bail out of probe on failure.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
---
sound/soc/codecs/lpass-va-macro.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index 946051698420..dbc5795b9273 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -1605,7 +1605,9 @@ static int va_macro_probe(struct platform_device *pdev)
va->has_npl_clk = data->has_npl_clk;
/* mclk rate */
- clk_set_rate(va->mclk, 2 * VA_MACRO_MCLK_FREQ);
+ ret = clk_set_rate(va->mclk, 2 * VA_MACRO_MCLK_FREQ);
+ if (ret)
+ goto err;
if (va->has_npl_clk) {
va->npl = devm_clk_get(dev, "npl");
@@ -1614,7 +1616,9 @@ static int va_macro_probe(struct platform_device *pdev)
goto err;
}
- clk_set_rate(va->npl, 2 * VA_MACRO_MCLK_FREQ);
+ ret = clk_set_rate(va->npl, 2 * VA_MACRO_MCLK_FREQ);
+ if (ret)
+ goto err;
}
ret = devm_pm_clk_create(dev);
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: check clk_set_rate() return value
2026-07-15 11:55 [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: check clk_set_rate() return value Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 1/2] ASoC: codecs: lpass-wsa-macro: " Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 2/2] ASoC: codecs: lpass-va-macro: " Ajay Kumar Nandam
@ 2026-07-15 13:45 ` Cezary Rojewski
2 siblings, 0 replies; 4+ messages in thread
From: Cezary Rojewski @ 2026-07-15 13:45 UTC (permalink / raw)
To: Ajay Kumar Nandam
Cc: linux-sound, linux-arm-msm, linux-kernel, Konrad Dybcio,
Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
On 7/15/2026 1:55 PM, Ajay Kumar Nandam wrote:
> clk_set_rate() returns 0 on success or a negative errno on failure but
> the WSA and VA macro probe functions are ignoring it. This series adds
> return value checking and bails out of probe on failure.
>
> This mirrors the same fix already posted for the TX and RX macros [1].
>
> [1] https://lore.kernel.org/all/20260707-xo-sd-codec-tx-rx-v2-3-f61b4622f97f@oss.qualcomm.com/
>
> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
> ---
> Changes in v2:
> - Use present tense in commit messages
> - Carry Reviewed-by tag from Konrad
> - Link to v1: https://patch.msgid.link/20260715-xo-sd-codec-wsa-va-clk-set-rate-v1-0-f0c713ff0b4e@oss.qualcomm.com
Not CC'ing reviewers is frowned upon on the list.
Nonetheless, thank you for addressing the comments. For the series:
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-15 13:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 11:55 [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: check clk_set_rate() return value Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 1/2] ASoC: codecs: lpass-wsa-macro: " Ajay Kumar Nandam
2026-07-15 11:55 ` [PATCH v2 2/2] ASoC: codecs: lpass-va-macro: " Ajay Kumar Nandam
2026-07-15 13:45 ` [PATCH v2 0/2] ASoC: codecs: lpass-{wsa,va}-macro: " Cezary Rojewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome