From: Yuho Choi <oss.patchbox@gmail.com>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: "Geert Uytterhoeven" <geert+renesas@glider.be>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Yuho Choi" <oss.patchbox@gmail.com>
Subject: [PATCH v2] PCI: rcar: Release temporary device tree node reference
Date: Wed, 23 Sep 2026 21:04:11 -0400 [thread overview]
Message-ID: <20260924010418.726980-1-oss.patchbox@gmail.com> (raw)
of_find_matching_node() returns a referenced node even when it is used
only as a boolean test. Drop the reference right after the match check.
Fixes: a115b1bd3af0 ("PCI: rcar: Add L1 link state fix into data abort hook")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
---
Changes in v2:
- Use an explicit of_node_put() instead of __free(device_node) (Marek Vasut)
- Switch to my oss.patchbox address
v1: https://lore.kernel.org/all/20260801233841.469826-1-dbgh9129@gmail.com/
drivers/pci/controller/pcie-rcar-host.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index cd9171eebc289..1f5e33c802b5b 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -1122,7 +1122,11 @@ 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;
+
+ np = of_find_matching_node(NULL, rcar_pcie_abort_handler_of_match);
+ if (np) {
+ of_node_put(np);
#ifdef CONFIG_ARM_LPAE
hook_fault_code(17, rcar_pcie_aarch32_abort_handler, SIGBUS, 0,
"asynchronous external abort");
base-commit: f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
--
2.43.0
next reply other threads:[~2026-09-24 1:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 1:04 Yuho Choi [this message]
2026-09-24 1:10 ` [PATCH v2] PCI: rcar: Release temporary device tree node reference sashiko-bot
2026-09-24 6:51 ` Geert Uytterhoeven
2026-09-25 4:31 ` 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=20260924010418.726980-1-oss.patchbox@gmail.com \
--to=oss.patchbox@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=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.