From: Mark Brown Date: Mon, 12 Aug 2013 23:20:36 +0000 (+0100) Subject: ASoC: dapm: Ensure kcontrol list is initialised X-Git-Tag: v3.12-rc1~43^2~7^2~2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69c2d346e8fa8dbed122e82f727332f35718ab86;p=profile%2Fcommon%2Fkernel-common.git 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 --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index b885a9b..d84bd0f 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);