summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authoryixuanjiang <yixuanjiang@google.com>2023-06-19 11:31:27 +0800
committerMark Brown <broonie@kernel.org>2023-06-21 13:42:44 +0100
commit2222214749a9969e09454b9ba7febfdfb09c1c8d (patch)
tree5f5e78995ec74bd5a07a28905fdd30cbb17083a8 /sound
parent1f1ef7e5bbe2de125da413e238915f6047ea4ba2 (diff)
downloadlinux-stable-2222214749a9969e09454b9ba7febfdfb09c1c8d.tar.gz
linux-stable-2222214749a9969e09454b9ba7febfdfb09c1c8d.tar.bz2
linux-stable-2222214749a9969e09454b9ba7febfdfb09c1c8d.zip
ASoC: soc-compress: Fix deadlock in soc_compr_open_fe
Modify the error handling flow by release lock. The require mutex will keep holding if open fail. Fixes: aa9ff6a4955f ("ASoC: soc-compress: Reposition and add pcm_mutex") Signed-off-by: yixuanjiang <yixuanjiang@google.com> Link: https://lore.kernel.org/r/20230619033127.2522477-1-yixuanjiang@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-compress.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index d8715db5e415..2117fd61cf8f 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -194,6 +194,7 @@ open_err:
snd_soc_dai_compr_shutdown(cpu_dai, cstream, 1);
out:
dpcm_path_put(&list);
+ snd_soc_dpcm_mutex_unlock(fe);
be_err:
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;
snd_soc_card_mutex_unlock(fe->card);