summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/hdmi-codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/hdmi-codec.c')
-rw-r--r--sound/soc/codecs/hdmi-codec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 511d09cb2181..ca86eefdb9eb 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -140,8 +140,12 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
if (!ret) {
ret = snd_pcm_hw_constraint_eld(substream->runtime,
hcp->eld);
- if (ret)
+ if (ret) {
+ mutex_lock(&hcp->current_stream_lock);
+ hcp->current_stream = NULL;
+ mutex_unlock(&hcp->current_stream_lock);
return ret;
+ }
}
}
return 0;