[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1593569786-11500-15-git-send-email-yangtiezhu@loongson.cn>
Date: Wed, 1 Jul 2020 10:16:26 +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 v4 14/14] irqchip/xilinx-intc: Fix potential resource leak
In the function xilinx_intc_of_init(), system resource "irqc->root_domain"
was not released in the error case. Thus add jump target for the completion
of the desired exception handling.
Fixes: 9689c99e4950 ("irqchip/xilinx: Add support for parent intc")
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
drivers/irqchip/irq-xilinx-intc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c
index 1d3d273..dcc51e0 100644
--- a/drivers/irqchip/irq-xilinx-intc.c
+++ b/drivers/irqchip/irq-xilinx-intc.c
@@ -241,7 +241,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
} else {
pr_err("irq-xilinx: interrupts property not in DT\n");
ret = -EINVAL;
- goto error;
+ goto error_domain_remove;
}
} else {
primary_intc = irqc;
@@ -250,6 +250,8 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
return 0;
+error_domain_remove:
+ irq_domain_remove(irqc->root_domain);
error:
iounmap(irqc->base);
kfree(irqc);
--
2.1.0
Powered by blists - more mailing lists