dsp: asm: initialize variables before use
Initialize flag variables before use in spinlocks.
CRs-Fixed: 2257317
Change-Id: I105b96208a62cc4b50e726af9dac4b728c9a1c98
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
diff --git a/dsp/q6asm.c b/dsp/q6asm.c
index 2539564..699d52b 100644
--- a/dsp/q6asm.c
+++ b/dsp/q6asm.c
@@ -573,7 +573,7 @@
static void q6asm_session_free(struct audio_client *ac)
{
int session_id;
- unsigned long flags;
+ unsigned long flags = 0;
pr_debug("%s: sessionid[%d]\n", __func__, ac->session);
session_id = ac->session;
@@ -1621,7 +1621,7 @@
uint32_t dir = 0;
uint32_t i = IN;
uint32_t *payload;
- unsigned long dsp_flags;
+ unsigned long dsp_flags = 0;
unsigned long flags = 0;
struct asm_buffer_node *buf_node = NULL;
struct list_head *ptr, *next;
@@ -1838,7 +1838,7 @@
{
int i = 0;
struct audio_client *ac = (struct audio_client *)priv;
- unsigned long dsp_flags;
+ unsigned long dsp_flags = 0;
uint32_t *payload;
uint32_t wakeup_flag = 1;
int32_t ret = 0;
@@ -1846,7 +1846,7 @@
uint8_t buf_index;
struct msm_adsp_event_data *pp_event_package = NULL;
uint32_t payload_size = 0;
- unsigned long flags;
+ unsigned long flags = 0;
int session_id;
if (ac == NULL) {
@@ -2531,7 +2531,7 @@
static void __q6asm_add_hdr(struct audio_client *ac, struct apr_hdr *hdr,
uint32_t pkt_size, uint32_t cmd_flg, uint32_t stream_id)
{
- unsigned long flags;
+ unsigned long flags = 0;
dev_vdbg(ac->dev, "%s: pkt_size=%d cmd_flg=%d session=%d stream_id=%d\n",
__func__, pkt_size, cmd_flg, ac->session, stream_id);