Skip to content

Commit f38409d

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 b5d46ed commit f38409d

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
@@ -2774,7 +2774,8 @@ static int wsa_macro_probe(struct platform_device *pdev)
27742774

27752775
/* set MCLK and NPL rates */
27762776
clk_set_rate(wsa->mclk, WSA_MACRO_MCLK_FREQ);
2777-
clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ);
2777+
if (wsa->npl)
2778+
clk_set_rate(wsa->npl, WSA_MACRO_MCLK_FREQ);
27782779

27792780
ret = devm_pm_clk_create(dev);
27802781
if (ret)

0 commit comments

Comments
 (0)