ASoC: Fix early event callback list iteration
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 22 May 2013 22:12:53 +0000 (00:12 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 22 May 2013 22:32:58 +0000 (17:32 -0500)
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>
sound/soc/soc-dapm.c

index 071579be7cb9581dd35a840c00c9da710ce83e3c..35073462d948cc1f66e0b664115d5efbe40d3dd2 100644 (file)
@@ -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);
        }
 
This page took 0.046466 seconds and 5 git commands to generate.