diff options
| author | Ulf Hansson <ulf.hansson@linaro.org> | 2025-05-08 13:31:15 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2025-05-08 13:31:15 +0200 |
| commit | 36114344675ddddb158dd6628359f83b44bfc1ac (patch) | |
| tree | 81ed8b16155f7d65a1d7b83b94045e00bcf17cdd | |
| parent | e3407cc5eeff5a5375016a6da93c525f5ef2e1f9 (diff) | |
| parent | 0f5757667ec0aaf2456c3b76fcf0c6c3ea3591fe (diff) | |
pmdomain: Merge branch fixes into next
Merge the pmdomain fixes for v6.15-rc[n] into the next branch, to allow
them to get tested together with the new changes that are targeted for
v6.16.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/pmdomain/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index cd4429653093..ff5c7f2b69ce 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -3176,7 +3176,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev, /* Verify that the index is within a valid range. */ num_domains = of_count_phandle_with_args(dev->of_node, "power-domains", "#power-domain-cells"); - if (index >= num_domains) + if (num_domains < 0 || index >= num_domains) return NULL; /* Allocate and register device on the genpd bus. */ |
