Merge "dsp: prm: move g_prm.state and g_prm.status into mutex_lock protection"

This commit is contained in:
qctecmdr
2022-11-22 07:13:49 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -86,13 +86,13 @@ static int prm_gpr_send_pkt(struct gpr_pkt *pkt, wait_queue_head_t *wait)
int ret = 0; int ret = 0;
int retry; int retry;
mutex_lock(&g_prm.lock);
pr_debug("%s: enter",__func__);
if (wait) if (wait)
atomic_set(&g_prm.state, 1); atomic_set(&g_prm.state, 1);
atomic_set(&g_prm.status, 0); atomic_set(&g_prm.status, 0);
mutex_lock(&g_prm.lock);
pr_debug("%s: enter",__func__);
if (g_prm.adev == NULL) { if (g_prm.adev == NULL) {
pr_err("%s: apr is unregistered\n", __func__); pr_err("%s: apr is unregistered\n", __func__);
mutex_unlock(&g_prm.lock); mutex_unlock(&g_prm.lock);