[PATCH 1/2] PCI: dw-rockchip: Bail out if the INTx irq domain creation fails
Shawn Lin
shawn.lin at rock-chips.com
Wed Sep 2 19:44:36 PDT 2026
rockchip_pcie_init_irq_domain() can fail, e.g. when the DT node is
missing its "legacy-interrupt-controller" child node. In that case,
rockchip_pcie_host_init() only prints an error and continues, arming the
chained INTx handler with a NULL irq_domain. The first INTx interrupt
then dereferences the NULL irq_domain in rockchip_pcie_intx_handler(),
which panics the machine.
Propagate the error to abort probing, keeping the error message for
easier debugging.
Fixes: e8aae154df61 ("PCI: rockchip-dwc: Add legacy interrupt support")
Cc: Peter Geis <pgwipeout at gmail.com>
Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---
drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
index af26a07..50824c8 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -432,8 +432,10 @@ static int rockchip_pcie_host_init(struct dw_pcie_rp *pp)
pci->dbi_base2 = pci->dbi_base + PCIE_TYPE0_HDR_DBI2_OFFSET;
ret = rockchip_pcie_init_irq_domain(rockchip);
- if (ret < 0)
+ if (ret < 0) {
dev_err(dev, "failed to init irq domain\n");
+ return ret;
+ }
irq_set_chained_handler_and_data(irq, rockchip_pcie_intx_handler,
rockchip);
--
2.7.4
More information about the Linux-rockchip
mailing list