public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ankit Agrawal <agrawal.ag.ankit@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/clocksource/qcom: Add missing iounmap() on error when reading clock frequency.
Date: Wed, 10 Jul 2024 16:38:13 +0530	[thread overview]
Message-ID: <20240710110813.GA15351@bnew-VirtualBox> (raw)

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


             reply	other threads:[~2024-07-10 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 11:08 Ankit Agrawal [this message]
2024-07-10 11:54 ` [PATCH] drivers/clocksource/qcom: Add missing iounmap() on error when reading clock frequency 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240710110813.GA15351@bnew-VirtualBox \
    --to=agrawal.ag.ankit@gmail.com \
    --cc=andersson@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox