[alsa-devel] [PATCH] ASoC: dapm: Ensure kcontrol list is initialised

Mark Brown broonie at kernel.org
Tue Aug 13 01:21:11 CEST 2013

From: Mark Brown <broonie at linaro.org>

Ensure that the recently added path kcontrol list is initialised otherwise
we may crash trying to delete routes that don't have kcontrols.

Signed-off-by: Mark Brown <broonie at linaro.org>
 sound/soc/soc-dapm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b78eaa1..1e0e4ce 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2357,6 +2357,7 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
 	path->sink = wsink;
 	path->connected = connected;
+	INIT_LIST_HEAD(&path->list_kcontrol);

More information about the Alsa-devel mailing list