diff options
| author | Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> | 2017-03-27 13:10:09 -0700 |
|---|---|---|
| committer | Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> | 2017-03-31 16:10:33 -0700 |
| commit | 5559ceed4646ffe2e13a32b9216c3701efab6fca (patch) | |
| tree | 9be6637145105610d90def595434e9bdac6c8cf1 /drivers/soc/qcom | |
| parent | 92124c76a2bd3e0c1d98de91d09199558117a1a9 (diff) | |
soc: qcom: service-locator: Return in case of no matching domains found
If no matching domains found in response to the request, return error
instead of going ahead with memory allocation which would lead to
other issues.
CRs-Fixed: 2025293
Change-Id: I327b3494812cddc643f6b355c04f85f4baa7c399
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'drivers/soc/qcom')
| -rw-r--r-- | drivers/soc/qcom/service-locator.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soc/qcom/service-locator.c b/drivers/soc/qcom/service-locator.c index 5ac2a58899f4..0625f75de373 100644 --- a/drivers/soc/qcom/service-locator.c +++ b/drivers/soc/qcom/service-locator.c @@ -266,8 +266,10 @@ static int service_locator_send_msg(struct pd_qmi_client_data *pd) if (!domains_read) { db_rev_count = pd->db_rev_count = resp->db_rev_count; pd->total_domains = resp->total_domains; - if (!resp->total_domains) - pr_info("No matching domains found\n"); + if (!resp->total_domains) { + pr_err("No matching domains found\n"); + goto out; + } pd->domain_list = kmalloc( sizeof(struct servreg_loc_entry_v01) * |
