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 3/3] irqchip/uniphier-aidet: Remove the interrupt domain on unbind
Date: Sat, 28 Nov 2026 17:41:21 +0800	[thread overview]
Message-ID: <20261128-f81b700d6c-u38-3@mail.sdu.edu.cn> (raw)
In-Reply-To: <20261128-f81b700d6c-u38-0@mail.sdu.edu.cn>

The interrupt domain remains registered after device removal frees
its controller data. Remove it before devres releases the register
mapping and private structure.

This issue was found by our static analysis tool under development.

Fixes: 5ed34d3a4387 ("irqchip: Add UniPhier AIDET irqchip driver")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
 drivers/irqchip/irq-uniphier-aidet.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/irqchip/irq-uniphier-aidet.c b/drivers/irqchip/irq-uniphier-aidet.c
index dca3c6003539..a6cfe75c1989 100644
--- a/drivers/irqchip/irq-uniphier-aidet.c
+++ b/drivers/irqchip/irq-uniphier-aidet.c
@@ -198,6 +198,13 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static void uniphier_aidet_remove(struct platform_device *pdev)
+{
+	struct uniphier_aidet_priv *priv = platform_get_drvdata(pdev);
+
+	irq_domain_remove(priv->domain);
+}
+
 static int __maybe_unused uniphier_aidet_suspend(struct device *dev)
 {
 	struct uniphier_aidet_priv *priv = dev_get_drvdata(dev);
@@ -242,6 +249,7 @@ static const struct of_device_id uniphier_aidet_match[] = {
 
 static struct platform_driver uniphier_aidet_driver = {
 	.probe = uniphier_aidet_probe,
+	.remove = uniphier_aidet_remove,
 	.driver = {
 		.name = "uniphier-aidet",
 		.of_match_table = uniphier_aidet_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 ` [PATCH 2/3] irqchip/ti-sci-intr: " Guangshuo Li
2026-11-28  9:41 ` Guangshuo Li [this message]
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-3@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®