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>
This commit is contained in:
parent
92124c76a2
commit
5559ceed46
1 changed files with 4 additions and 2 deletions
|
@ -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) *
|
||||
|
|
Loading…
Add table
Reference in a new issue