Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked
@ 2019-02-06 11:13 Charles Keepax
  0 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2019-02-06 11:13 UTC (permalink / raw)
  To: broonie; +Cc: patches, alsa-devel, krzk, lgirdwood, s.nawrocki

DAIs linked to the dummy will not have an associated playback/capture
widget, so we need to skip the update in that case.

Fixes: 078a85f2806f ("ASoC: dapm: Only power up active channels from a DAI")
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 sound/soc/soc-dapm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 5b74dffc9c11d..111a23a9708a2 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2580,6 +2580,9 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
 	else
 		w = dai->capture_widget;
 
+	if (!w)
+		return 0;
+
 	dev_dbg(dai->dev, "Update DAI routes for %s %s\n", dai->name,
 		dir == SNDRV_PCM_STREAM_PLAYBACK ? "playback" : "capture");
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread
[parent not found: <CGME20190205211638epcas3p409823d4acac8073473153d745151ea5f@epcas3p4.samsung.com>]

end of thread, other threads:[~2019-02-06 15:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-06 11:13 [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked Charles Keepax
     [not found] <CGME20190205211638epcas3p409823d4acac8073473153d745151ea5f@epcas3p4.samsung.com>
2019-02-05 21:16 ` [BUG BISECT] NULL pointer after commit "ASoC: dapm: Only power up active channels from a DAI" Krzysztof Kozlowski
2019-02-06  9:46   ` Sylwester Nawrocki
2019-02-06 10:05     ` [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked Charles Keepax
2019-02-06 10:18       ` Sylwester Nawrocki
2019-02-06 10:22       ` Krzysztof Kozlowski
2019-02-06 10:59         ` Charles Keepax
2019-02-06 11:14           ` Krzysztof Kozlowski
2019-02-06 11:45             ` Charles Keepax
2019-02-06 15:47               ` Sylwester Nawrocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox