projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7cb8a4
)
ASoC: dapm - Fix check for codec context in dapm_power_widgets().
author
Liam Girdwood
<lrg@ti.com>
Mon, 16 Jan 2012 15:23:31 +0000
(15:23 +0000)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Mon, 16 Jan 2012 15:49:09 +0000
(15:49 +0000)
Fixes a NULL pointer dereference in dapm_power_widgets() if the dapm context
has no codec.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-dapm.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-dapm.c
b/sound/soc/soc-dapm.c
index
3ad1f59
..
1f55ded
100644
(file)
--- 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;