[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230301185209.274134-2-jjhiblot@traphandler.com>
Date: Wed, 1 Mar 2023 19:52:07 +0100
From: Jean-Jacques Hiblot <jjhiblot@...phandler.com>
To: <saravanak@...gle.com>, <clement.leger@...tlin.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Russell King <linux@...linux.org.uk>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
<zajec5@...il.com>, Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Marc Zyngier <maz@...nel.org>, <afaerber@...e.de>,
Manivannan Sadhasivam <mani@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Nishanth Menon <nm@...com>, <ssantosh@...nel.org>,
<mathias.nyman@...el.com>, <gregkh@...uxfoundation.org>,
<thierry.reding@...il.com>, <jonathanh@...dia.com>
CC: <linux-renesas-soc@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-wireless@...r.kernel.org>,
<linux-actions@...ts.infradead.org>,
<linux-riscv@...ts.infradead.org>, <linux-sunxi@...ts.linux.dev>,
<devicetree@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-usb@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
Jean-Jacques Hiblot <jjhiblot@...phandler.com>
Subject: [PATCH 1/3] of: irq: make callers of of_irq_parse_raw() release the device node
of_irq_parse_raw() does a get() on the device node returned in out_irq->np.
Callers of of_irq_parse_raw() must do a put() when they are done with it.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@...phandler.com>
---
arch/powerpc/platforms/fsl_uli1575.c | 1 +
drivers/bcma/main.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index 84afae7a25617..ba104f6474bc8 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -334,6 +334,7 @@ static void hpcd_final_uli5288(struct pci_dev *dev)
laddr[1] = laddr[2] = 0;
of_irq_parse_raw(laddr, &oirq);
dev->irq = irq_create_of_mapping(&oirq);
+ of_node_put(oirq.np);
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575);
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 0a8469e0b13ad..11219dd79d327 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -193,7 +193,10 @@ static unsigned int bcma_of_get_irq(struct device *parent,
return 0;
}
- return irq_create_of_mapping(&out_irq);
+ ret = irq_create_of_mapping(&out_irq);
+ of_node_put(out_irq.np);
+
+ return ret;
}
static void bcma_of_fill_device(struct device *parent,
--
2.25.1
Powered by blists - more mailing lists