public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/clocksource/qcom: Add missing iounmap() on error when reading clock frequency.
@ 2024-07-10 11:08 Ankit Agrawal
  2024-07-10 11:54 ` Konrad Dybcio
  0 siblings, 1 reply; 6+ messages in thread
From: Ankit Agrawal @ 2024-07-10 11:08 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Konrad Dybcio, Daniel Lezcano, Thomas Gleixner, linux-arm-msm,
	linux-kernel

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-12  8:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 11:08 [PATCH] drivers/clocksource/qcom: Add missing iounmap() on error when reading clock frequency Ankit Agrawal
2024-07-10 11:54 ` Konrad Dybcio
2024-07-11  5:49   ` Ankit Agrawal
2024-07-11  8:11     ` Konrad Dybcio
2024-07-11  8:13       ` Konrad Dybcio
2024-07-12  8:36         ` Ankit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox