Skip to content

Commit 3611434

Browse files
committed
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>
2 parents e3407cc + 0f57576 commit 3611434

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pmdomain/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
31763176
/* Verify that the index is within a valid range. */
31773177
num_domains = of_count_phandle_with_args(dev->of_node, "power-domains",
31783178
"#power-domain-cells");
3179-
if (index >= num_domains)
3179+
if (num_domains < 0 || index >= num_domains)
31803180
return NULL;
31813181

31823182
/* Allocate and register device on the genpd bus. */

0 commit comments

Comments
 (0)