Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yuho Choi <dbgh9129@gmail.com>
To: linux@armlinux.org.uk
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Yuho Choi <dbgh9129@gmail.com>
Subject: [PATCH v1] ARM: setup: Drop reference to device tree root node
Date: Sat,  1 Aug 2026 19:19:53 -0400	[thread overview]
Message-ID: <20260801231953.464006-1-dbgh9129@gmail.com> (raw)

init_machine_late() obtains the root device tree node with
of_find_node_by_path() but does not release the reference after reading
the serial-number property. Drop the reference once the property lookup
is complete.

Fixes: 3f599875e520 ("ARM: 8355/1: arch: Show the serial number from devicetree in cpuinfo")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
---
 arch/arm/kernel/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 0bfd66c7ada0..2a179aeb637b 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -962,6 +962,7 @@ static int __init init_machine_late(void)
 					      &system_serial);
 		if (ret)
 			system_serial = NULL;
+		of_node_put(root);
 	}
 
 	if (!system_serial)
-- 
2.43.0



                 reply	other threads:[~2026-08-01 23:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260801231953.464006-1-dbgh9129@gmail.com \
    --to=dbgh9129@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox