[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bw5hh2mlgaxxxy6rcjksrqfkpencjx36iywy7kp4s65ah5qe6c@ye6dmhzhdlck>
Date: Sun, 13 Apr 2025 22:42:58 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Marc Zyngier <maz@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, asahi@...ts.linux.dev,
Alyssa Rosenzweig <alyssa@...enzweig.io>, Janne Grunau <j@...nau.net>, Hector Martin <marcan@...can.st>,
Sven Peter <sven@...npeter.dev>, Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>, Krzysztof Wilczyński <kw@...ux.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Mark Kettenis <mark.kettenis@...all.nl>
Subject: Re: [PATCH v3 08/13] PCI: apple: Fix missing OF node reference in
apple_pcie_setup_port
On Tue, Apr 01, 2025 at 10:17:08AM +0100, Marc Zyngier wrote:
> From: Hector Martin <marcan@...can.st>
>
> In the success path, we hang onto a reference to the node, so make sure
> to grab one. The caller iterator puts our borrowed reference when we
> return.
>
> Reviewed-by: Rob Herring (Arm) <robh@...nel.org>
> Acked-by: Alyssa Rosenzweig <alyssa@...enzweig.io>
> Tested-by: Janne Grunau <j@...nau.net>
> Signed-off-by: Hector Martin <marcan@...can.st>
> Signed-off-by: Alyssa Rosenzweig <alyssa@...enzweig.io>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
- Mani
> ---
> drivers/pci/controller/pcie-apple.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
> index 6b04bf0b41dcc..23d9f62bd2ad4 100644
> --- a/drivers/pci/controller/pcie-apple.c
> +++ b/drivers/pci/controller/pcie-apple.c
> @@ -593,6 +593,9 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
> list_add_tail(&port->entry, &pcie->ports);
> init_completion(&pcie->event);
>
> + /* In the success path, we keep a reference to np around */
> + of_node_get(np);
> +
> ret = apple_pcie_port_register_irqs(port);
> WARN_ON(ret);
>
> --
> 2.39.2
>
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists