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 <abavanar@codeaurora.org>
This commit is contained in:
Aditya Bavanari 2020-12-29 18:03:07 +05:30
commit af0786e0e3

View file

@ -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) ||