* [PATCH RFC] clocksource: dbx500-prcmu: check timer register mapping
@ 2026-09-11 6:09 Slavin Liu
0 siblings, 0 replies; only message in thread
From: Slavin Liu @ 2026-09-11 6:09 UTC (permalink / raw)
To: linusw, daniel.lezcano, tglx; +Cc: linux-arm-kernel, linux-kernel, bolin.liu
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: 9d2aa8c7961a ("ARM/clocksource: use automatic DT probing for ux500 PRCMU")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
---
drivers/clocksource/clksrc-dbx500-prcmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c
index 2fc93e46cea3..1af223b0e896 100644
--- a/drivers/clocksource/clksrc-dbx500-prcmu.c
+++ b/drivers/clocksource/clksrc-dbx500-prcmu.c
@@ -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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 6:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 6:09 [PATCH RFC] clocksource: dbx500-prcmu: check timer register mapping Slavin Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox