From: Seth Forshee Date: Fri, 2 Feb 2007 16:14:19 +0000 (+0100) Subject: [ALSA] soc - 0.13 ASoC DAPM bug fix for unnamed streams X-Git-Tag: v2.6.21-rc1~83^2~62^2~29 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11da21a79048472a14b201120c0c50b10060220b;p=linux-2.6 [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 Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 5c2a34956a..d0162a4cb7 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) {