Commit 94305e83 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pmdomain fixes from Ulf Hansson:
 "Core:

   - Fix error checking in genpd_dev_pm_attach_by_id()

  Providers:

   - renesas: Remove obsolete nullify checks for rcar domains"

* tag 'pmdomain-v6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
  pmdomain: renesas: rcar: Remove obsolete nullify checks
parents a5b2c67a 0f575766
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3126,7 +3126,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. */
+0 −5
Original line number Diff line number Diff line
@@ -338,11 +338,6 @@ static int __init rcar_gen4_sysc_pd_init(void)
		struct rcar_gen4_sysc_pd *pd;
		size_t n;

		if (!area->name) {
			/* Skip NULLified area */
			continue;
		}

		n = strlen(area->name) + 1;
		pd = kzalloc(sizeof(*pd) + n, GFP_KERNEL);
		if (!pd) {
+0 −5
Original line number Diff line number Diff line
@@ -396,11 +396,6 @@ static int __init rcar_sysc_pd_init(void)
		struct rcar_sysc_pd *pd;
		size_t n;

		if (!area->name) {
			/* Skip NULLified area */
			continue;
		}

		n = strlen(area->name) + 1;
		pd = kzalloc(sizeof(*pd) + n, GFP_KERNEL);
		if (!pd) {