You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
irqchip/nvic: Release nvic_base upon failure
[ Upstream commit e414c25e33 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4bbd910de1
commit
9fc899ce5a
@@ -94,6 +94,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;
|
||||
}
|
||||
|
||||
@@ -103,6 +104,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user