Skip to content

Commit 757322b

Browse files
Souptick Joarder (HPE)gregkh
authored andcommitted
irqchip/nvic: Release nvic_base upon failure
[ Upstream commit e414c25 ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent dabfc87 commit 757322b

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
@@ -92,6 +92,7 @@ static int __init nvic_of_init(struct device_node *node,
9292

9393
if (!nvic_irq_domain) {
9494
pr_warn("Failed to allocate irq domain\n");
95+
iounmap(nvic_base);
9596
return -ENOMEM;
9697
}
9798

@@ -101,6 +102,7 @@ static int __init nvic_of_init(struct device_node *node,
101102
if (ret) {
102103
pr_warn("Failed to allocate irq chips\n");
103104
irq_domain_remove(nvic_irq_domain);
105+
iounmap(nvic_base);
104106
return ret;
105107
}
106108

0 commit comments

Comments
 (0)