提交 9780a0f1 编写于 作者: C Christophe JAILLET 提交者: Hongchen Zhang

irqchip/loongson-liointc: Fix an error handling path in liointc_init()

mainline inclusion
from mainline-v6.0-rc2
commit a9084d88
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB
CVE: NA

--------------------------------

All errors lead to the error handling path, except the one dealing
with "reg-names" in DT.

Fix it and release some resources before returning if this test fails.

Fixes: 0858ed03 ("irqchip/loongson-liointc: Add ACPI init support")
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
[maz: fix commit message]
Signed-off-by: NMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1a6d74ab70712279023aa7bdbd31bd3aec103bc0.1659382063.git.christophe.jaillet@wanadoo.fr
上级 629dc96c
......@@ -207,7 +207,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
"reg-names", core_reg_names[i]);
if (index < 0)
return -EINVAL;
goto out_iounmap;
priv->core_isr[i] = of_iomap(node, index);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册