summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorSeth Forshee <seth.forshee@gmail.com>2007-02-02 17:14:19 +0100
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:03:37 +0100
commit11da21a79048472a14b201120c0c50b10060220b (patch)
treef7d276a11162ea37dac15aa550996be6a29e048a /sound/soc/soc-dapm.c
parentcb666e5bd865cc991c0048d6e81581019a141820 (diff)
[ALSA] soc - 0.13 ASoC DAPM bug fix for unnamed streams
This patch fixes a bug whereby an unnamed stream would cause a NULL pointer ref in snd_soc_dapm_stream_event(). Signed-off-by: Seth Forshee <seth.forshee@gmail.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 5c2a34956a5d..d0162a4cb7fd 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1239,6 +1239,9 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec,
{
struct snd_soc_dapm_widget *w;
+ if (stream == NULL)
+ return 0;
+
mutex_lock(&codec->mutex);
list_for_each_entry(w, &codec->dapm_widgets, list)
{