From: Haofeng Li <920484857@qq.com>
To: tglx@kernel.org
Cc: linux-kernel@vger.kernel.org, Haofeng Li <13266079573@163.com>,
Haofeng Li <lihaofeng@kylinos.cn>,
Caleb James DeLisle <cjd@cjdns.fr>,
linux-mips@vger.kernel.org
Subject: [PATCH 09/16] irqchip/econet: clean up VEIC initialization
Date: Tue, 14 Jul 2026 21:24:45 +0800 [thread overview]
Message-ID: <tencent_880FD85090AE06087ABB6451DAE1F77A0309@qq.com> (raw)
In-Reply-To: <20260714132453.3302672-1-920484857@qq.com>
From: Haofeng Li <lihaofeng@kylinos.cn>
When cpu_has_veic is set, econet_cpu_init() failure returns without
tearing down the already created IRQ domain, ioremap, memory region,
or parent IRQ mapping. The parent interrupt-controller node obtained
while finding the IPI domain also retains an OF node reference on both
success and failure.
Drop the parent node reference after the domain lookup and route VEIC
initialization failures through the existing resource cleanup labels
after removing the IRQ domain.
Fixes: 2ee2a685ee83 ("irqchip/econet-en751221: Support MIPS 34Kc VEIC mode")
Signed-off-by: Haofeng Li <lihaofeng@kylinos.cn>
---
drivers/irqchip/irq-econet-en751221.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-econet-en751221.c b/drivers/irqchip/irq-econet-en751221.c
index 2ca5d901866f..f6f890b3f881 100644
--- a/drivers/irqchip/irq-econet-en751221.c
+++ b/drivers/irqchip/irq-econet-en751221.c
@@ -378,6 +378,7 @@ static int __init econet_cpu_init(struct device_node *node)
}
econet_intc.ipi_domain = irq_find_matching_host(parent_intc, DOMAIN_BUS_IPI);
+ of_node_put(parent_intc);
if (!econet_intc.ipi_domain) {
pr_err("%pOF: Failed to find parent %s\n", node, "IPI domain");
return -ENODEV;
@@ -459,7 +460,7 @@ static int __init econet_intc_of_init(struct device_node *node, struct device_no
ret = econet_cpu_init(node);
if (ret)
- return ret;
+ goto err_remove_domain;
} else {
irq_set_chained_handler_and_data(irq, econet_intc_from_parent, domain);
}
@@ -468,6 +469,8 @@ static int __init econet_intc_of_init(struct device_node *node, struct device_no
return 0;
+err_remove_domain:
+ irq_domain_remove(domain);
err_unmap:
iounmap(econet_intc.membase);
err_release:
--
2.25.1
next prev parent reply other threads:[~2026-07-14 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260714122351.3274006-1-lihaofeng@kylinos.cn>
[not found] ` <20260714132453.3302672-1-920484857@qq.com>
2026-07-14 13:24 ` [PATCH 05/16] irqchip/bcm7038-l1: clean up init failure paths Haofeng Li
2026-07-28 17:36 ` Florian Fainelli
2026-07-14 13:24 ` [PATCH 06/16] irqchip/loongson-liointc: unmap per-core iomaps on error Haofeng Li
2026-08-02 16:31 ` Radu Rendec
2026-07-14 13:24 ` [PATCH 07/16] irqchip/mips-gic: clean up IRQ domain creation failure Haofeng Li
2026-08-02 19:19 ` Radu Rendec
2026-07-14 13:24 ` [PATCH 08/16] irqchip/mips-gic: clean up if IPI domain registration fails Haofeng Li
2026-08-02 19:26 ` Radu Rendec
2026-07-14 13:24 ` Haofeng Li [this message]
2026-07-23 1:09 ` [PATCH 09/16] irqchip/econet: clean up VEIC initialization Caleb James DeLisle
2026-07-14 13:24 ` [PATCH 11/16] irqchip/loongson-eiointc: preserve live state on cascade failure Haofeng Li
2026-07-14 13:24 ` [PATCH 16/16] irqchip/bcm7120-l2: fix parent IRQ count error handling Haofeng Li
2026-07-28 15:57 ` Florian Fainelli
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=tencent_880FD85090AE06087ABB6451DAE1F77A0309@qq.com \
--to=920484857@qq.com \
--cc=13266079573@163.com \
--cc=cjd@cjdns.fr \
--cc=lihaofeng@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tglx@kernel.org \
/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