From: Lars-Peter Clausen Date: Wed, 22 May 2013 22:12:53 +0000 (+0200) Subject: ASoC: Fix early event callback list iteration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf1f7c6e8756646db7a0d883013cedd90eb90dd4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: Fix early event callback list iteration The power_list field is used when adding a widget to a power sequence list. Use the same field when iterating the list using list_for_each_entry, otherwise we'll see undefined behavior. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 071579be7cb9..35073462d948 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1738,11 +1738,11 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) &async_domain); async_synchronize_full_domain(&async_domain); - list_for_each_entry(w, &down_list, list) { + list_for_each_entry(w, &down_list, power_list) { dapm_seq_check_event(dapm, w, SND_SOC_DAPM_WILL_PMD); } - list_for_each_entry(w, &up_list, list) { + list_for_each_entry(w, &up_list, power_list) { dapm_seq_check_event(dapm, w, SND_SOC_DAPM_WILL_PMU); }