[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1593998365-25910-12-git-send-email-yangtiezhu@loongson.cn>
Date: Mon, 6 Jul 2020 09:19:22 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <maz@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Markus Elfring <Markus.Elfring@....de>
Subject: [PATCH v5 11/14] irqchip/omap-intc: Fix potential resource leak
In the function omap_init_irq_of(), system resource "omap_irq_base"
was not released in an error case. Thus add a call of the function
"iounmap" in the if branch.
Fixes: 8598066cddd1 ("arm: omap: irq: move irq.c to drivers/irqchip/")
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
drivers/irqchip/irq-omap-intc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index d360a6e..e711530 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -254,8 +254,10 @@ static int __init omap_init_irq_of(struct device_node *node)
omap_irq_soft_reset();
ret = omap_alloc_gc_of(domain, omap_irq_base);
- if (ret < 0)
+ if (ret < 0) {
irq_domain_remove(domain);
+ iounmap(omap_irq_base);
+ }
return ret;
}
--
2.1.0
Powered by blists - more mailing lists