summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Kohli <gkohli@codeaurora.org>2016-08-04 17:40:15 +0530
committerGaurav Kohli <gkohli@codeaurora.org>2016-08-04 18:13:31 +0530
commit8e2b2f77fc1785219cf52e730bcea98317495e21 (patch)
treee03e706cd2b698fcc5b1cf3176655da181954cb6
parent1ecb9eaec78fbaa3187574c347165bb70e54fef3 (diff)
soc: qcom: Initialize message pointer with NULL
During service locator call there is a chance in which resp message is used or freed while uninitialized.So to prevent it initialize the same with NULL. Change-Id: I65f854e184606684ce2ca711f19cf61d26c1ecb5 Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
-rw-r--r--drivers/soc/qcom/service-locator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/qcom/service-locator.c b/drivers/soc/qcom/service-locator.c
index 2bc425a437b2..bac524f97158 100644
--- a/drivers/soc/qcom/service-locator.c
+++ b/drivers/soc/qcom/service-locator.c
@@ -206,8 +206,8 @@ static int servreg_loc_send_msg(struct msg_desc *req_desc,
static int service_locator_send_msg(struct pd_qmi_client_data *pd)
{
struct msg_desc req_desc, resp_desc;
- struct qmi_servreg_loc_get_domain_list_resp_msg_v01 *resp;
- struct qmi_servreg_loc_get_domain_list_req_msg_v01 *req;
+ struct qmi_servreg_loc_get_domain_list_resp_msg_v01 *resp = NULL;
+ struct qmi_servreg_loc_get_domain_list_req_msg_v01 *req = NULL;
int rc;
int db_rev_count = 0, domains_read = 0;