summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPuja Gupta <pujag@codeaurora.org>2016-11-03 11:35:56 -0700
committerPuja Gupta <pujag@codeaurora.org>2016-11-03 11:46:36 -0700
commit5d08a1c80dca4b843641d46ab6202c92b090a478 (patch)
treece1f3083db9cc9ba61d2bd8ed0e0733270544dc8
parent8992f7dd08968333dcbeb70c5a0862970a0094cf (diff)
soc: qcom: Initialize structure with default values
There is possibility for use of uninitialized variable. Hence initialize the structure with default values. Also fix couple of other debug logs. CRs-Fixed: 1078904 Change-Id: I32abceba2d55c95bdb8e9b6463a39d29fb3bc7c7 Signed-off-by: Puja Gupta <pujag@codeaurora.org>
-rw-r--r--drivers/soc/qcom/service-locator.c2
-rw-r--r--drivers/soc/qcom/service-notifier.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/soc/qcom/service-locator.c b/drivers/soc/qcom/service-locator.c
index 24018c544b06..2b708732760f 100644
--- a/drivers/soc/qcom/service-locator.c
+++ b/drivers/soc/qcom/service-locator.c
@@ -149,7 +149,7 @@ static void service_locator_recv_msg(struct work_struct *work)
do {
pr_debug("Notified about a Receive event\n");
ret = qmi_recv_msg(service_locator.clnt_handle);
- if (ret != -ENOMSG)
+ if (ret < 0)
pr_err("Error receiving message rc:%d. Retrying...\n",
ret);
} while (ret == 0);
diff --git a/drivers/soc/qcom/service-notifier.c b/drivers/soc/qcom/service-notifier.c
index 8cba88742cb8..a244bc168136 100644
--- a/drivers/soc/qcom/service-notifier.c
+++ b/drivers/soc/qcom/service-notifier.c
@@ -162,7 +162,7 @@ static void root_service_clnt_recv_msg(struct work_struct *work)
data->instance_id);
} while ((ret = qmi_recv_msg(data->clnt_handle)) == 0);
- pr_info("Notified about a Receive event (instance-id: %d)\n",
+ pr_debug("Notified about a Receive event (instance-id: %d)\n",
data->instance_id);
}
@@ -227,7 +227,8 @@ static void root_service_service_ind_cb(struct qmi_handle *handle,
struct qmi_client_info *data = (struct qmi_client_info *)ind_cb_priv;
struct service_notif_info *service_notif;
struct msg_desc ind_desc;
- struct qmi_servreg_notif_state_updated_ind_msg_v01 ind_msg;
+ struct qmi_servreg_notif_state_updated_ind_msg_v01 ind_msg = {
+ QMI_STATE_MIN_VAL, "", 0xFFFF };
int rc;
ind_desc.msg_id = SERVREG_NOTIF_STATE_UPDATED_IND_MSG;