Skip to content

Commit 480422b

Browse files
Ajay Kumar NandamRaviHothi
authored andcommitted
FROMLIST: ASoC: codecs: lpass-wsa-macro: Guard optional NPL clock rate programming
The NPL clock is only present on some platforms. When it is absent, wsa->npl remains NULL, but the driver unconditionally programs its rate. Guard clk_set_rate() for the NPL clock so platforms without NPL do not attempt to access it. No functional change on platforms that provide the NPL clock. Link: https://lore.kernel.org/all/20260413121824.375473-4-ajay.nandam@oss.qualcomm.com/ Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
1 parent 579a1e2 commit 480422b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sound/soc/codecs/lpass-wsa-macro.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,8 @@ static int wsa_macro_probe(struct platform_device *pdev)
28852885

28862886
/* set MCLK and NPL rates */
28872887
clk_set_rate(wsa->mclk, WSA_MACRO_MCLK_FREQ);
2888-
clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ);
2888+
if (wsa->npl)
2889+
clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ);
28892890

28902891
ret = devm_pm_clk_create(dev);
28912892
if (ret)

0 commit comments

Comments
 (0)