From a5bc5ed2f139cd768e180528949922c6a60840ca Mon Sep 17 00:00:00 2001 From: Karthikeyan Mani Date: Thu, 23 Feb 2017 11:37:09 -0800 Subject: ASoC: msm: qdsp6v2: Initialize variables before use Initialize variable before use to avoid invalid memory access. CRs-fixed: 2004067 Change-Id: I1ede035a71a620e6981731f0c76d90625c4898b8 Signed-off-by: Karthikeyan Mani --- drivers/soc/qcom/qdsp6v2/apr_tal_glink.c | 2 +- drivers/soc/qcom/qdsp6v2/audio_notifier.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c b/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c index d11ffdde23be..b3e11ef5c692 100644 --- a/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c +++ b/drivers/soc/qcom/qdsp6v2/apr_tal_glink.c @@ -115,7 +115,7 @@ int apr_tal_write(struct apr_svc_ch_dev *apr_ch, void *data, { int rc = 0, retries = 0; void *pkt_data = NULL; - struct apr_tx_buf *tx_buf; + struct apr_tx_buf *tx_buf = NULL; struct apr_pkt_priv *pkt_priv_ptr = pkt_priv; if (!apr_ch->handle || !pkt_priv) diff --git a/drivers/soc/qcom/qdsp6v2/audio_notifier.c b/drivers/soc/qcom/qdsp6v2/audio_notifier.c index b120883afbb0..dce25ce9ea50 100644 --- a/drivers/soc/qcom/qdsp6v2/audio_notifier.c +++ b/drivers/soc/qcom/qdsp6v2/audio_notifier.c @@ -510,7 +510,7 @@ int audio_notifier_deregister(char *client_name) int ret = 0; int ret2; struct list_head *ptr, *next; - struct client_data *client_data; + struct client_data *client_data = NULL; if (client_name == NULL) { pr_err("%s: client_name is NULL\n", __func__); -- cgit v1.2.3