aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Baryshkov <[email protected]>2024-06-22 01:03:41 +0300
committerBjorn Andersson <[email protected]>2024-06-23 22:41:39 -0500
commit57f20d51f35780f240ecf39d81cda23612800a92 (patch)
tree88d8205fc7a411933ff50c70fff21a42b8eeeb05
parent107924c14e3ddd85119ca43c26a4ee1056fa9b84 (diff)
soc: qcom: pdr: fix parsing of domains lists
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: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Steev Klimaszewski <[email protected]> Tested-by: Alexey Minnekhanov <[email protected]> Reviewed-by: Chris Lew <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
-rw-r--r--drivers/soc/qcom/pdr_interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c
index 76a62c2ecc58..216166e98fae 100644
--- a/drivers/soc/qcom/pdr_interface.c
+++ b/drivers/soc/qcom/pdr_interface.c
@@ -417,7 +417,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))