From 69c2d346e8fa8dbed122e82f727332f35718ab86 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 13 Aug 2013 00:20:36 +0100 Subject: [PATCH] ASoC: dapm: Ensure kcontrol list is initialised 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 Acked-by: Lars-Peter Clausen --- 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 b885a9bedc4e..d84bd0f167b6 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2354,6 +2354,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); + INIT_LIST_HEAD(&path->list_kcontrol); INIT_LIST_HEAD(&path->list_source); INIT_LIST_HEAD(&path->list_sink); -- GitLab