Loading drivers/pmdomain/core.c +1 −1 Original line number Diff line number Diff line Loading @@ -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. */ Loading Loading
drivers/pmdomain/core.c +1 −1 Original line number Diff line number Diff line Loading @@ -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. */ Loading