Skip to content

Commit

Permalink
[UPSTREAM] soc: qcom: pdr: fix parsing of domains lists
Browse files Browse the repository at this point in the history
While parsing the domains list, start offsets from 0 rather than from
domains_read. The domains_read is equal to the total count of the
domains we have seen, while the domains list in the message starts from
offset 0.

Fixes: fbe639b ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Steev Klimaszewski <[email protected]>
Tested-by: Alexey Minnekhanov <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
  • Loading branch information
lumag authored and minlexx committed Jul 14, 2024
1 parent b63e0a9 commit 78d77bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/soc/qcom/pdr_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)
if (ret < 0)
goto out;

for (i = domains_read; i < resp->domain_list_len; i++) {
for (i = 0; i < resp->domain_list_len; i++) {
entry = &resp->domain_list[i];

if (strnlen(entry->name, sizeof(entry->name)) == sizeof(entry->name))
Expand Down

0 comments on commit 78d77bb

Please sign in to comment.