From: Yuho Choi <dbgh9129@gmail.com>
To: marek.vasut+renesas@mailbox.org,
yoshihiro.shimoda.uh@renesas.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, mani@kernel.org, bhelgaas@google.com,
geert+renesas@glider.be, magnus.damm@gmail.com
Cc: robh@kernel.org, linux-pci@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
Yuho Choi <dbgh9129@gmail.com>
Subject: [PATCH v1] PCI: rcar: Release temporary device tree node reference
Date: Sat, 1 Aug 2026 19:38:41 -0400 [thread overview]
Message-ID: <20260801233841.469826-1-dbgh9129@gmail.com> (raw)
of_find_matching_node() returns a referenced node even when it is used
only as a boolean test. Keep the result in a scoped cleanup variable
so the reference is released after the match check.
Fixes: a115b1bd3af0 ("PCI: rcar: Add L1 link state fix into data abort hook")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
---
drivers/pci/controller/pcie-rcar-host.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index cd9171eebc28..7ed1bc0732ce 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -1122,7 +1122,10 @@ static const struct of_device_id rcar_pcie_abort_handler_of_match[] __initconst
static int __init rcar_pcie_init(void)
{
- if (of_find_matching_node(NULL, rcar_pcie_abort_handler_of_match)) {
+ struct device_node *np __free(device_node) =
+ of_find_matching_node(NULL, rcar_pcie_abort_handler_of_match);
+
+ if (np) {
#ifdef CONFIG_ARM_LPAE
hook_fault_code(17, rcar_pcie_aarch32_abort_handler, SIGBUS, 0,
"asynchronous external abort");
--
2.43.0
next reply other threads:[~2026-08-01 23:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 23:38 Yuho Choi [this message]
2026-08-01 23:42 ` [PATCH v1] PCI: rcar: Release temporary device tree node reference sashiko-bot
2026-08-02 2:20 ` Marek Vasut
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=20260801233841.469826-1-dbgh9129@gmail.com \
--to=dbgh9129@gmail.com \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=robh@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.