diff options
author | Jyri Sarha <jsarha@ti.com> | 2015-11-10 17:12:42 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-10 19:52:06 +0100 |
commit | fd589a1be20fdd76ef97700dd0185e7a060546dc (patch) | |
tree | 93a642eaf9fd2868431a06da7556d2e87b831762 /include | |
parent | Merge remote-tracking branches 'asoc/topic/wm8904', 'asoc/topic/wm8955' and '... (diff) | |
download | linux-fd589a1be20fdd76ef97700dd0185e7a060546dc.tar.xz linux-fd589a1be20fdd76ef97700dd0185e7a060546dc.zip |
ASoC: dapm: Reset dapm wcache after freeing damp widgets
If there is anything in damp->path_source_cache or
damp->path_sink_cache, it can not be valid after the widgets have been
freed. Without this patch a repeated remove and load of a machine
driver may cause NULL pointer reference in dapm_wcache_lookup() when a
freed widget, not belonging to any list, is haunting in the wcache.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/soc-dapm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 7855cfe46b69..95a937eafb79 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -398,6 +398,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm, int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, const struct snd_soc_dapm_route *route, int num); void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w); +void snd_soc_dapm_reset_cache(struct snd_soc_dapm_context *dapm); /* dapm events */ void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, |