From cc879c910d88d68f14553ebc939dd5c1da047743 Mon Sep 17 00:00:00 2001 From: Soumya Managoli Date: Tue, 12 Sep 2023 13:59:03 +0530 Subject: [PATCH] ASoC: msm-pcm-host-voice: Handle mutex lock-unlock Return error when dai_data is NULL thereby avoiding mutex unlock when lock is not acquired. Change-Id: Ica43cac41da5ff03847641ea5b8d40630976b451 Signed-off-by: Soumya Managoli --- asoc/msm-pcm-host-voice-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asoc/msm-pcm-host-voice-v2.c b/asoc/msm-pcm-host-voice-v2.c index 42c3a59a99ef..75cac617568b 100644 --- a/asoc/msm-pcm-host-voice-v2.c +++ b/asoc/msm-pcm-host-voice-v2.c @@ -1035,7 +1035,7 @@ static int msm_pcm_close(struct snd_pcm_substream *substream) pr_err("%s, dai_data is NULL\n", __func__); ret = -EINVAL; - goto done; + return ret; } wake_up(&dai_data->queue_wait);