summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorSouptick Joarder (HPE) <jrdr.linux@gmail.com>2022-02-18 17:33:03 +0100
committerMarc Zyngier <maz@kernel.org>2022-03-01 11:19:51 +0100
commite414c25e3399b2b3d7337dc47abccab5c71b7c8f (patch)
tree1709bbb3d35223cef6b475fcfc7c959a6cefdf5c /drivers/irqchip
parentirqchip/gic-v3: Use dsb(ishst) to order writes with ICC_SGI1R_EL1 accesses (diff)
downloadlinux-e414c25e3399b2b3d7337dc47abccab5c71b7c8f.tar.xz
linux-e414c25e3399b2b3d7337dc47abccab5c71b7c8f.zip
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
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-nvic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c
index ba4759b3e269..94230306e0ee 100644
--- a/drivers/irqchip/irq-nvic.c
+++ b/drivers/irqchip/irq-nvic.c
@@ -107,6 +107,7 @@ static int __init nvic_of_init(struct device_node *node,
if (!nvic_irq_domain) {
pr_warn("Failed to allocate irq domain\n");
+ iounmap(nvic_base);
return -ENOMEM;
}
@@ -116,6 +117,7 @@ static int __init nvic_of_init(struct device_node *node,
if (ret) {
pr_warn("Failed to allocate irq chips\n");
irq_domain_remove(nvic_irq_domain);
+ iounmap(nvic_base);
return ret;
}