projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85efd60
)
irqchip/loongson-htvec: Fix potential resource leak
author
Tiezhu Yang
<yangtiezhu@loongson.cn>
Tue, 7 Jul 2020 02:12:47 +0000
(10:12 +0800)
committer
Marc Zyngier
<maz@kernel.org>
Fri, 17 Jul 2020 12:41:42 +0000
(13:41 +0100)
In the function htvec_of_init(), system resource "parent_irq"
was not released in an error case. Thus add a jump target for
the completion of the desired exception handling.
Fixes:
818e915fbac5
("irqchip: Add Loongson HyperTransport Vector support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link:
https://lore.kernel.org/r/1594087972-21715-4-git-send-email-yangtiezhu@loongson.cn
drivers/irqchip/irq-loongson-htvec.c
patch
|
blob
|
history
diff --git
a/drivers/irqchip/irq-loongson-htvec.c
b/drivers/irqchip/irq-loongson-htvec.c
index
1ece933
..
b36d403
100644
(file)
--- a/
drivers/irqchip/irq-loongson-htvec.c
+++ b/
drivers/irqchip/irq-loongson-htvec.c
@@
-192,7
+192,7
@@
static int htvec_of_init(struct device_node *node,
if (!priv->htvec_domain) {
pr_err("Failed to create IRQ domain\n");
err = -ENOMEM;
- goto i
ounmap_ba
se;
+ goto i
rq_dispo
se;
}
htvec_reset(priv);
@@
-203,6
+203,9
@@
static int htvec_of_init(struct device_node *node,
return 0;
+irq_dispose:
+ for (; i > 0; i--)
+ irq_dispose_mapping(parent_irq[i - 1]);
iounmap_base:
iounmap(priv->base);
free_priv: