Преглед на файлове

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 <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Lars-Peter Clausen преди 12 години
родител
ревизия
cf1f7c6e87
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      sound/soc/soc-dapm.c

+ 2 - 2
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);
 	}