]> git.itanic.dy.fi Git - linux-stable/commitdiff
powerpc/cell: Add missing of_node_put()s
authorLiang He <windhl@126.com>
Sun, 19 Jun 2022 07:23:35 +0000 (15:23 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Sep 2022 07:28:26 +0000 (17:28 +1000)
Use of_node_put() for of_find_node_by_path() and
of_find_node_by_phandle() to keep refcount balance.

Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220619072335.4067728-1-windhl@126.com
arch/powerpc/platforms/cell/setup.c
arch/powerpc/platforms/cell/spu_manage.c

index 52de014983c97f73d1488a4a357878c3a769e293..47eaf75349f2fcc1773569bdfaa25f68a54d0a2f 100644 (file)
@@ -167,6 +167,8 @@ static int __init cell_publish_devices(void)
                of_platform_device_create(np, NULL, NULL);
        }
 
+       of_node_put(root);
+
        /* There is no device for the MIC memory controller, thus we create
         * a platform device for it to attach the EDAC driver to.
         */
index ae09c5a91b4078d63ad4490b95e092a8b80a2976..f1ac4c7420690a5d5f5792966c55ba29aa3f29c4 100644 (file)
@@ -488,6 +488,8 @@ static void __init init_affinity_node(int cbe)
                                avoid_ph = vic_dn->phandle;
                        }
 
+                       of_node_put(vic_dn);
+
                        list_add_tail(&spu->aff_list, &last_spu->aff_list);
                        last_spu = spu;
                        break;