Skip to contentSkip to conversation

ASoC: rt1320: fix uninitialized stream_config->type

PATCH Superseded [email protected] 1 participant 1 message Sep 3

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 ASoC: rt1320: fix uninitialized stream_config->type

From: Shuming Fan <[email protected]>

The stream_config variable was not initialized before being passed to sdw_stream_add_slave().
This may cause unexpected behavior when configuring the SoundWire stream.

---
 sound/soc/codecs/rt1320-sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt1320-sdw.c +1 -1
index 90333779971d..72af413306fa 100644
@@ -3246,7 +3246,7 @@ static int rt1320_sdw_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_component *component = dai->component;
 	struct rt1320_sdw_priv *rt1320 =
 		snd_soc_component_get_drvdata(component);
-	struct sdw_stream_config stream_config;
+	struct sdw_stream_config stream_config = {0};
 	struct sdw_port_config port_config;
 	struct sdw_port_config dmic_port_config[2];
 	struct sdw_stream_runtime *sdw_stream;
Signature · 1 line
2.54.0