From: Shawn Lin <shawn.lin@rock-chips.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Manivannan Sadhasivam <mani@kernel.org>
Cc: linux-rockchip@lists.infradead.org, linux-pci@vger.kernel.org,
Peter Geis <pgwipeout@gmail.com>,
Niklas Cassel <cassel@kernel.org>,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH 1/2] PCI: dw-rockchip: Bail out if the INTx irq domain creation fails
Date: Thu, 3 Sep 2026 10:44:36 +0800 [thread overview]
Message-ID: <1788403477-71491-2-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1788403477-71491-1-git-send-email-shawn.lin@rock-chips.com>
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@gmail.com>
Signed-off-by: Shawn Lin <shawn.lin@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
next prev parent reply other threads:[~2026-09-03 3:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 2:44 [PATCH 0/2] Two small INTx fixes for Rockchip's dwc based PCIe controller driver Shawn Lin
2026-09-03 2:44 ` Shawn Lin [this message]
2026-09-03 3:12 ` [PATCH 1/2] PCI: dw-rockchip: Bail out if the INTx irq domain creation fails sashiko-bot
2026-09-03 3:42 ` Shawn Lin
2026-09-03 2:44 ` [PATCH 2/2] PCI: dw-rockchip: Do not recreate the INTx irq domain on root port reset Shawn Lin
2026-09-03 3:13 ` sashiko-bot
2026-09-03 3:46 ` Shawn Lin
2026-09-03 8:37 ` Niklas Cassel
2026-09-03 10:02 ` Shawn Lin
2026-09-03 8:20 ` [PATCH 0/2] Two small INTx fixes for Rockchip's dwc based PCIe controller driver Niklas Cassel
2026-09-03 8:26 ` Shawn Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1788403477-71491-2-git-send-email-shawn.lin@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mani@kernel.org \
--cc=pgwipeout@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox