projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f066e01
)
irqchip/mips-gic: Check the return value of ioremap() in gic_of_init()
author
William Dean
<williamsukatube@163.com>
Sat, 23 Jul 2022 10:01:28 +0000
(18:01 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:01 +0000
(14:23 +0200)
[ Upstream commit
71349cc85e5930dce78ed87084dee098eba24b59
]
The function ioremap() in gic_of_init() can fail, so
its return value should be checked.
Reported-by: Hacash Robot <hacashRobot@santino.com>
Signed-off-by: William Dean <williamsukatube@163.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link:
https://lore.kernel.org/r/20220723100128.2964304-1-williamsukatube@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-mips-gic.c
patch
|
blob
|
history
diff --git
a/drivers/irqchip/irq-mips-gic.c
b/drivers/irqchip/irq-mips-gic.c
index f03f47ffea1e1c91b419eb53efd89ef24f98f72c..d815285f1efe3aae175b2b23170864de2ca4c6b8 100644
(file)
--- a/
drivers/irqchip/irq-mips-gic.c
+++ b/
drivers/irqchip/irq-mips-gic.c
@@
-767,6
+767,10
@@
static int __init gic_of_init(struct device_node *node,
}
mips_gic_base = ioremap(gic_base, gic_len);
+ if (!mips_gic_base) {
+ pr_err("Failed to ioremap gic_base\n");
+ return -ENOMEM;
+ }
gicconfig = read_gic_config();
gic_shared_intrs = gicconfig & GIC_CONFIG_NUMINTERRUPTS;