From af0786e0e3466e2de2839b9274c57ad07e6f6dcd Mon Sep 17 00:00:00 2001 From: Aditya Bavanari Date: Tue, 29 Dec 2020 18:03:07 +0530 Subject: [PATCH] dsp: Fix improper mutex unlock in afe close During SSR use cases, when AFE APR handle is NULL and AFE close is invoked, mutex unlock is done without locking. Fix it and bail out without unlocking the mutex in this scenario. Change-Id: Ia2988b56425d8c2d5c726d5860c13e655e7e4ed1 Signed-off-by: Aditya Bavanari --- dsp/q6afe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dsp/q6afe.c b/dsp/q6afe.c index 556b4f84c248..ccfc7d5ff847 100644 --- a/dsp/q6afe.c +++ b/dsp/q6afe.c @@ -8950,8 +8950,7 @@ int afe_close(int port_id) proxy_afe_instance[port_id & 0x3] = 0; afe_close_done[port_id & 0x3] = true; } - ret = -EINVAL; - goto fail_cmd; + return -EINVAL; } pr_debug("%s: port_id = 0x%x\n", __func__, port_id); if ((port_id == RT_PROXY_DAI_001_RX) ||