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 <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@gmail.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220218163303.33344-1-jrdr.linux@gmail.com
1 parent 80e4e1f commit e414c25

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)