Commit d9e1c610 authored by Liang He's avatar Liang He Committed by Michael Ellerman
Browse files

powerpc/cell: Add missing of_node_put()s



Use of_node_put() for of_find_node_by_path() and
of_find_node_by_phandle() to keep refcount balance.

Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220619072335.4067728-1-windhl@126.com
parent d1aabbbb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.
	 */
+2 −0
Original line number Diff line number Diff line
@@ -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;