From: Jiri Slaby <jirislaby@kernel.org>
To: "Miaoqian Lin" <linmq006@gmail.com>,
"Richard Zhu" <hongxing.zhu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Trent Piepho" <tpiepho@impinj.com>,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
imx@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] PCI: imx: fix device node reference leak in imx_pcie_probe
Date: Fri, 5 Sep 2025 10:28:55 +0200 [thread overview]
Message-ID: <8705ef37-45b2-44cf-8223-2dceb211ad53@kernel.org> (raw)
In-Reply-To: <20250903135150.2527259-1-linmq006@gmail.com>
On 03. 09. 25, 15:51, Miaoqian Lin wrote:
> As the doc of of_parse_phandle() states:
> "The device_node pointer with refcount incremented. Use
> * of_node_put() on it when done."
> Add missing of_node_put() after of_parse_phandle() call to properly
> release the device node reference.
How did you verify the node can go after of_address_to_resource()?
> Fixes: 1df82ec46600 ("PCI: imx: Add workaround for e10728, IMX7d PCIe PLL failure")
> Cc: stable@vger.kernel.org
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index 80e48746bbaf..618bc4b08a8b 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1636,6 +1636,7 @@ static int imx_pcie_probe(struct platform_device *pdev)
> struct resource res;
>
> ret = of_address_to_resource(np, 0, &res);
> + of_node_put(np);
So why not to use __free(device_node)?
thanks,
--
js
suse labs
prev parent reply other threads:[~2025-09-05 10:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 13:51 [PATCH] PCI: imx: fix device node reference leak in imx_pcie_probe Miaoqian Lin
2025-09-03 17:10 ` Markus Elfring
2025-09-03 18:31 ` Frank Li
2025-09-05 8:28 ` Jiri Slaby [this message]
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=8705ef37-45b2-44cf-8223-2dceb211ad53@kernel.org \
--to=jirislaby@kernel.org \
--cc=bhelgaas@google.com \
--cc=festevam@gmail.com \
--cc=hongxing.zhu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=kwilczynski@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tpiepho@impinj.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox