From 855511173d50c5fc173e1487c19058069dd58dc0 Mon Sep 17 00:00:00 2001 From: yixuanjiang Date: Mon, 19 Jun 2023 11:31:27 +0800 Subject: [PATCH] UPSTREAM: ASoC: soc-compress: Fix deadlock in soc_compr_open_fe [ Upstream commit 2222214749a9969e09454b9ba7febfdfb09c1c8d ] 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 Link: https://lore.kernel.org/r/20230619033127.2522477-1-yixuanjiang@google.com Signed-off-by: Mark Brown Bug: 303236405 Change-Id: I64172b9d40b061239c7e4087f34759c3b23cfa6a Signed-off-by: Yixuan Jiang --- sound/soc/soc-compress.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 614780f5fbc7..2da4c991eb09 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -199,6 +199,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);