mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
To: tglx@kernel.org, nm@ti.com, kristo@kernel.org,
	ssantosh@kernel.org, hayashi.kunihiko@socionext.com,
	mhiramat@kernel.org, ioana.ciornei@nxp.com,
	alexander.stein@ew.tq-group.com, maz@kernel.org,
	lokeshvutla@ti.com, yamada.masahiro@socionext.com,
	robh@kernel.org
Cc: radu@rendec.net, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] irqchip/ti-sci-intr: Remove the interrupt domain on unbind
Date: Sat, 28 Nov 2026 17:41:18 +0800	[thread overview]
Message-ID: <20261128-f81b700d6c-u38-2@mail.sdu.edu.cn> (raw)
In-Reply-To: <20261128-f81b700d6c-u38-0@mail.sdu.edu.cn>

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@mail.sdu.edu.cn>
---
 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


  parent reply	other threads:[~2026-11-28  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28  9:41 [PATCH 0/3] irqchip: Remove interrupt domains on driver teardown Guangshuo Li
2026-11-28  9:41 ` [PATCH 1/3] irqchip/ls-extirq: Remove the interrupt domain on unbind Guangshuo Li
2026-11-28  9:41 ` Guangshuo Li [this message]
2026-11-28  9:41 ` [PATCH 3/3] irqchip/uniphier-aidet: " Guangshuo Li
2026-11-28 21:36 ` [PATCH 0/3] irqchip: Remove interrupt domains on driver teardown Radu Rendec

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=20261128-f81b700d6c-u38-2@mail.sdu.edu.cn \
    --to=liguangshuo@mail.sdu.edu.cn \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=kristo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=maz@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=nm@ti.com \
    --cc=radu@rendec.net \
    --cc=robh@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=tglx@kernel.org \
    --cc=yamada.masahiro@socionext.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

all inboxes | Powered by JetHome®