summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/lpass-rx-macro.c
diff options
context:
space:
mode:
authorAjay Kumar Nandam <ajay.nandam@oss.qualcomm.com>2026-07-07 15:13:13 +0530
committerMark Brown <broonie@kernel.org>2026-07-10 18:40:09 +0100
commitb8ca90fafe6adc401601f91d1394ba76bacf67ed (patch)
tree73f3ab99d01226cd71e521056606cfcfabe35fb6 /sound/soc/codecs/lpass-rx-macro.c
parentb05482e7ce1b110f86b08a99768ac41e4c9e4dfa (diff)
downloadlinux-next-b8ca90fafe6adc401601f91d1394ba76bacf67ed.tar.gz
linux-next-b8ca90fafe6adc401601f91d1394ba76bacf67ed.zip
ASoC: codecs: lpass-{tx,rx}-macro: check clk_set_rate() return value
clk_set_rate() returns 0 on success or a negative errno on failure but the TX and RX macro probe functions were ignoring it. Check the return value and bail out of probe on failure. Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Co-developed-by: Ravi Hothi <ravi.hothi@oss.qualcomm.com> Signed-off-by: Ravi Hothi <ravi.hothi@oss.qualcomm.com> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com> Link: https://patch.msgid.link/20260707-xo-sd-codec-tx-rx-v2-3-f61b4622f97f@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/lpass-rx-macro.c')
-rw-r--r--sound/soc/codecs/lpass-rx-macro.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 927f75050c0f..388cebf461a3 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -3863,8 +3863,13 @@ static int rx_macro_probe(struct platform_device *pdev)
rx->dev = dev;
/* set MCLK and NPL rates */
- clk_set_rate(rx->mclk, MCLK_FREQ);
- clk_set_rate(rx->npl, MCLK_FREQ);
+ ret = clk_set_rate(rx->mclk, MCLK_FREQ);
+ if (ret)
+ return ret;
+
+ ret = clk_set_rate(rx->npl, MCLK_FREQ);
+ if (ret)
+ return ret;
ret = devm_pm_clk_create(dev);
if (ret)