[PATCH v2 1/2] PCI: altera: Do not dispose parent IRQ mapping

From: Mahesh Vaidya

Date: Thu Apr 30 2026 - 16:44:20 EST


altera_pcie_irq_teardown() calls irq_dispose_mapping() on pcie->irq.
However, pcie->irq is the parent IRQ returned by platform_get_irq(), not
an IRQ mapping created by the Altera INTx irq_domain.

The Altera driver only installs a chained handler on the parent IRQ. It
should detach that handler during teardown, but it should not dispose the
parent IRQ mapping, which belongs to the parent interrupt controller's
irq_domain.

Drop irq_dispose_mapping(pcie->irq) from the teardown path.

Fixes: ec15c4d0d5d2 ("PCI: altera: Allow building as module")
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Subhransu S. Prusty <subhransu.sekhar.prusty@xxxxxxxxxx>
Signed-off-by: Mahesh Vaidya <mahesh.vaidya@xxxxxxxxxx>
---
drivers/pci/controller/pcie-altera.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c
index 3dbb7adc421c..3d3519b8d88f 100644
--- a/drivers/pci/controller/pcie-altera.c
+++ b/drivers/pci/controller/pcie-altera.c
@@ -868,7 +868,6 @@ static void altera_pcie_irq_teardown(struct altera_pcie *pcie)
{
irq_set_chained_handler_and_data(pcie->irq, NULL, NULL);
irq_domain_remove(pcie->irq_domain);
- irq_dispose_mapping(pcie->irq);
}

static int altera_pcie_parse_dt(struct altera_pcie *pcie)
--
2.34.1