mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
clocksource/drivers/dbx500-prcmu: Check timer register mapping
Return -ENOMEM if of_iomap() fails, before reading or configuring
the timer register block.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: 9d2aa8c796 ("ARM/clocksource: use automatic DT probing for ux500 PRCMU")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260911060917.94310-1-bolin.liu@seu.edu.cn
This commit is contained in:
parent
0d3a67b195
commit
8f30b035a6
|
|
@ -52,6 +52,8 @@ static struct clocksource clocksource_dbx500_prcmu = {
|
|||
static int __init clksrc_dbx500_prcmu_init(struct device_node *node)
|
||||
{
|
||||
clksrc_dbx500_timer_base = of_iomap(node, 0);
|
||||
if (!clksrc_dbx500_timer_base)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* The A9 sub system expects the timer to be configured as
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user