[PATCH 2/3] irqchip/ti-sci-intr: Remove the interrupt domain on unbind
From: Guangshuo Li
Date: Sat Nov 28 2026 - 04:41:29 EST
The IRQ domain remains registered when the platform device releases
the controller data used by its domain operations. Remove the
domain as part of device teardown.
This issue was found by our static analysis tool under development.
Fixes: cd844b0715ce ("irqchip/ti-sci-intr: Add support for Interrupt Router driver")
Signed-off-by: Guangshuo Li <liguangshuo@xxxxxxxxxxxxxxx>
---
drivers/irqchip/irq-ti-sci-intr.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c
index 1d2e5af3ac4f..d504bb8865b3 100644
--- a/drivers/irqchip/irq-ti-sci-intr.c
+++ b/drivers/irqchip/irq-ti-sci-intr.c
@@ -242,6 +242,11 @@ static const struct irq_domain_ops ti_sci_intr_irq_domain_ops = {
.translate = ti_sci_intr_irq_domain_translate,
};
+static void ti_sci_intr_remove_domain(void *data)
+{
+ irq_domain_remove(data);
+}
+
static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
{
struct irq_domain *parent_domain, *domain;
@@ -301,7 +306,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
dev_info(dev, "Interrupt Router %d domain created\n", intr->ti_sci_id);
- return 0;
+ return devm_add_action_or_reset(dev, ti_sci_intr_remove_domain, domain);
}
static const struct of_device_id ti_sci_intr_irq_domain_of_match[] = {
--
2.43.0