Unverified Commit 22222147 authored by yixuanjiang's avatar yixuanjiang Committed by Mark Brown
Browse files

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: aa9ff6a4 ("ASoC: soc-compress: Reposition and add pcm_mutex")
Signed-off-by: default avataryixuanjiang <yixuanjiang@google.com>
Link: https://lore.kernel.org/r/20230619033127.2522477-1-yixuanjiang@google.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1f1ef7e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
	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);