alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm - Fix check for codec context in dapm_power_widgets().
@ 2012-01-16 15:23 Liam Girdwood
  2012-01-16 15:50 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Liam Girdwood @ 2012-01-16 15:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood

Fixes a NULL pointer dereference in dapm_power_widgets() if the dapm context
has no codec.

Signed-off-by: Liam Girdwood <lrg@ti.com>
---
 sound/soc/soc-dapm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 3ad1f59..1f55ded 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1426,7 +1426,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
 			dapm->target_bias_level = SND_SOC_BIAS_ON;
 			break;
 		case SND_SOC_DAPM_STREAM_STOP:
-			if (dapm->codec->active)
+			if (dapm->codec && dapm->codec->active)
 				dapm->target_bias_level = SND_SOC_BIAS_ON;
 			else
 				dapm->target_bias_level = SND_SOC_BIAS_STANDBY;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: dapm - Fix check for codec context in dapm_power_widgets().
  2012-01-16 15:23 [PATCH] ASoC: dapm - Fix check for codec context in dapm_power_widgets() Liam Girdwood
@ 2012-01-16 15:50 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-01-16 15:50 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel

On Mon, Jan 16, 2012 at 03:23:31PM +0000, Liam Girdwood wrote:
> Fixes a NULL pointer dereference in dapm_power_widgets() if the dapm context
> has no codec.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-16 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 15:23 [PATCH] ASoC: dapm - Fix check for codec context in dapm_power_widgets() Liam Girdwood
2012-01-16 15:50 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).