Skip to content

Commit 65b2185

Browse files
Siddharth-Vadapalli-at-TIgregkh
authored andcommitted
PCI: keystone: Use devm_request_irq() to free "ks-pcie-error-irq" on exit
commit e51d05f upstream. Commit under Fixes introduced the IRQ handler for "ks-pcie-error-irq". The interrupt is acquired using "request_irq()" but is never freed if the driver exits due to an error. Although the section in the driver that invokes "request_irq()" has moved around over time, the issue hasn't been addressed until now. Fix this by using "devm_request_irq()" which automatically frees the interrupt if the driver exits. Fixes: 025dd3d ("PCI: keystone: Add error IRQ handler") Reported-by: Jiri Slaby <jirislaby@kernel.org> Closes: https://lore.kernel.org/r/3d3a4b52-e343-42f3-9d69-94c259812143@kernel.org Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250912100802.3136121-2-s-vadapalli@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 37e46d6 commit 65b2185

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/dwc/pci-keystone.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,8 +1202,8 @@ static int ks_pcie_probe(struct platform_device *pdev)
12021202
if (irq < 0)
12031203
return irq;
12041204

1205-
ret = request_irq(irq, ks_pcie_err_irq_handler, IRQF_SHARED,
1206-
"ks-pcie-error-irq", ks_pcie);
1205+
ret = devm_request_irq(dev, irq, ks_pcie_err_irq_handler, IRQF_SHARED,
1206+
"ks-pcie-error-irq", ks_pcie);
12071207
if (ret < 0) {
12081208
dev_err(dev, "failed to request error IRQ %d\n",
12091209
irq);

0 commit comments

Comments
 (0)