Skip to contentSkip to conversation

ASoC: Intel: sof_realtek_common: set ret = 0 as initial value

PATCH New Vitaliy Shevtsov 1 participant 1 message Oct 10, 2024 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: sof_realtek_common: set ret = 0 as initial value

From: Bard Liao <[email protected]>

commit 47d2b66fec133cb27da3a551334686e465d19469 upstream.

'ret' will not be initialized if dai_fmt is not DSP_A or DSP_B.

---
 sound/soc/intel/boards/sof_realtek_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/intel/boards/sof_realtek_common.c +2 -1
index ff2851fc8930..6c12ca92f371 100644
@@ -267,7 +267,8 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
 	struct snd_soc_dai_link *dai_link = rtd->dai_link;
 	struct snd_soc_dai *codec_dai;
-	int i, clk_freq, ret;
+	int i, clk_freq;
+	int ret = 0;
 
 	clk_freq = sof_dai_get_bclk(rtd);
 
Signature · 1 line
2.46.2