forked from Minki/linux
ASoC: dapm - Fix check for codec context in dapm_power_widgets().
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>
This commit is contained in:
parent
f7cb8a4be1
commit
e7c80e2a8b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user