Browse Source

[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>
Seth Forshee 18 năm trước cách đây
mục cha
commit
11da21a790
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      sound/soc/soc-dapm.c

+ 3 - 0
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;
 	struct snd_soc_dapm_widget *w;
 
 
+	if (stream == NULL)
+		return 0;
+
 	mutex_lock(&codec->mutex);
 	mutex_lock(&codec->mutex);
 	list_for_each_entry(w, &codec->dapm_widgets, list)
 	list_for_each_entry(w, &codec->dapm_widgets, list)
 	{
 	{