Skip to content

Commit e414c25

Browse files
Souptick Joarder (HPE)Marc Zyngier
authored andcommitted
irqchip/nvic: Release nvic_base upon failure
smatch warning was reported as below -> smatch warnings: drivers/irqchip/irq-nvic.c:131 nvic_of_init() warn: 'nvic_base' not released on lines: 97. Release nvic_base upon failure. Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Souptick Joarder (HPE) <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 80e4e1f commit e414c25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/irqchip/irq-nvic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ static int __init nvic_of_init(struct device_node *node,
107107

108108
if (!nvic_irq_domain) {
109109
pr_warn("Failed to allocate irq domain\n");
110+
iounmap(nvic_base);
110111
return -ENOMEM;
111112
}
112113

@@ -116,6 +117,7 @@ static int __init nvic_of_init(struct device_node *node,
116117
if (ret) {
117118
pr_warn("Failed to allocate irq chips\n");
118119
irq_domain_remove(nvic_irq_domain);
120+
iounmap(nvic_base);
119121
return ret;
120122
}
121123

0 commit comments

Comments
 (0)