bus: arm-cci: Drop CPU node reference in cci_ace_init_ports()

cci_ace_init_ports() looks up each possible CPU's node with
of_get_cpu_node(), which returns the node with its reference count
raised, but never releases it: neither when the CPU has no ACE port nor
after the port has been recorded.  Before the commit below the loop used
for_each_child_of_node(), which manages the references itself.

The node is only needed for the port lookup, so drop the reference right
after __cci_ace_get_port().

Fixes: 78b4d6e0fd ("drivers/bus: arm-cci: avoid parsing DT for cpu device nodes")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
Link: https://lore.kernel.org/r/20260923163536.596107-1-oss.patchbox@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Yuho Choi 2026-09-23 12:35:15 -04:00 committed by Arnd Bergmann
parent a5c3d987fc
commit 41d6c0fcd4
No known key found for this signature in database
GPG Key ID: 9A6C79EFE60018D9

View File

@ -199,6 +199,7 @@ static void cci_ace_init_ports(void)
continue;
port = __cci_ace_get_port(cpun, ACE_PORT);
of_node_put(cpun);
if (port < 0)
continue;