Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00683a08 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dsp: lsm: Initialize lock and condition before apr_register"

parents e520ee58 8a81c4a8
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -311,6 +311,11 @@ struct lsm_client *q6lsm_client_alloc(lsm_app_cb cb, void *priv)
		kfree(client);
		return NULL;
	}

	init_waitqueue_head(&client->cmd_wait);
	mutex_init(&client->cmd_lock);
	atomic_set(&client->cmd_state, CMD_STATE_CLEARED);

	pr_debug("%s: Client Session %d\n", __func__, client->session);
	client->apr = apr_register("ADSP", "LSM", q6lsm_callback,
				   ((client->session) << 8 | client->session),
@@ -328,9 +333,6 @@ struct lsm_client *q6lsm_client_alloc(lsm_app_cb cb, void *priv)
		goto fail;
	}

	init_waitqueue_head(&client->cmd_wait);
	mutex_init(&client->cmd_lock);
	atomic_set(&client->cmd_state, CMD_STATE_CLEARED);
	pr_debug("%s: New client allocated\n", __func__);
	return client;
fail: