[PATCH] drivers/clocksource/qcom: Add missing iounmap() on error when reading clock frequency.

From: Ankit Agrawal
Date: Wed Jul 10 2024 - 07:08:28 EST


Add the missing iounmap() when clock frequency fails to get read by the
of_property_read_u32() call.

Signed-off-by: Ankit Agrawal <agrawal.ag.ankit@xxxxxxxxx>
---
drivers/clocksource/timer-qcom.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/timer-qcom.c b/drivers/clocksource/timer-qcom.c
index b4afe3a67..a66fa7f8e 100644
--- a/drivers/clocksource/timer-qcom.c
+++ b/drivers/clocksource/timer-qcom.c
@@ -233,6 +233,7 @@ static int __init msm_dt_timer_init(struct device_node *np)
}

if (of_property_read_u32(np, "clock-frequency", &freq)) {
+ iounmap(cpu0_base);
pr_err("Unknown frequency\n");
return -EINVAL;
}
--
2.25.1