mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
irqchip/nvic: Release nvic_base upon failure
[ Upstream commit e414c25e3399b2b3d7337dc47abccab5c71b7c8f ] 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] Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
c159eb634e
commit
e464aafd35
1 changed files with 2 additions and 0 deletions
|
|
@ -105,6 +105,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;
|
||||
}
|
||||
|
||||
|
|
@ -114,6 +115,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue