mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 6.1] ASoC: Intel: sof_realtek_common: set ret = 0 as initial value
@ 2024-10-10 20:08 Vitaliy Shevtsov
  0 siblings, 0 replies; only message in thread
From: Vitaliy Shevtsov @ 2024-10-10 20:08 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Vitaliy Shevtsov, Ranjani Sridharan, Bard Liao,
	Pierre-Louis Bossart, Mark Brown, Cezary Rojewski, Liam Girdwood,
	Peter Ujfalusi, Kai Vehmanen, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, linux-kernel, lvc-project

From: Bard Liao <yung-chuan.liao@linux.intel.com>

commit 47d2b66fec133cb27da3a551334686e465d19469 upstream.

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

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221206212507.359993-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
---
 sound/soc/intel/boards/sof_realtek_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/sof_realtek_common.c b/sound/soc/intel/boards/sof_realtek_common.c
index ff2851fc8930..6c12ca92f371 100644
--- a/sound/soc/intel/boards/sof_realtek_common.c
+++ b/sound/soc/intel/boards/sof_realtek_common.c
@@ -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);
 
-- 
2.46.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-10 20:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-10 20:08 [PATCH 6.1] ASoC: Intel: sof_realtek_common: set ret = 0 as initial value Vitaliy Shevtsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®