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>,
	Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] clocksource: qcom: Add missing iounmap() on errors in msm_dt_timer_init()
Date: Sat, 13 Jul 2024 15:58:20 +0530	[thread overview]
Message-ID: <20240713102820.GA430622@bnew-VirtualBox> (raw)
In-Reply-To: <20240713095713.GA430091@bnew-VirtualBox>

On Sat, Jul 13, 2024 at 03:27:13PM +0530, Ankit Agrawal wrote:
> Add the missing iounmap() when clock frequency fails to get read by the
> of_property_read_u32() call, or if the call to msm_timer_init() fails.
> 
> Fixes: 6e3321631ac2 ("ARM: msm: Add DT support to msm_timer")
> Signed-off-by: Ankit Agrawal <agrawal.ag.ankit@gmail.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> Changes in v3:
> - Update patch commit message
> - Link to v2: https://lore.kernel.org/linux-arm-msm/20240712082747.GA182658@bnew-VirtualBox/
> 
> Changes in v2:
> - Add iounmap() if msm_timer_init() fails
> - Update patch commit message
> - Link to v1: https://lore.kernel.org/linux-arm-msm/20240710110813.GA15351@bnew-VirtualBox/
> ---
>  drivers/clocksource/timer-qcom.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-qcom.c b/drivers/clocksource/timer-qcom.c
> index b4afe3a67..eac4c95c6 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;
>  	}
> @@ -243,7 +244,11 @@ static int __init msm_dt_timer_init(struct device_node *np)
>  	freq /= 4;
>  	writel_relaxed(DGT_CLK_CTL_DIV_4, source_base + DGT_CLK_CTL);
>  
> -	return msm_timer_init(freq, 32, irq, !!percpu_offset);
> +	ret = msm_timer_init(freq, 32, irq, !!percpu_offset);
> +	if (ret)
> +		iounmap(cpu0_base);
> +
> +	return ret;
>  }
>  TIMER_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
>  TIMER_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
> -- 
> 2.25.1

Hello maintainers, 

Could you please suggest the next steps that should be taken to move
this patch further. From what I understand, the merge-window for the
next stable kernel release (v6.11) is open, and I would be very much
grateful if I could get help on moving this patch further.

Also, please let me know if I need to make any changes to the patch in
order to finalize it :)

Thanks!
Ankit

  reply	other threads:[~2024-07-16  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-13  9:57 [PATCH v3] clocksource: qcom: Add missing iounmap() on errors in msm_dt_timer_init() Ankit Agrawal
2024-07-13 10:28 ` Ankit Agrawal [this message]
2024-07-16 10:48   ` Konrad Dybcio
2024-09-02  9:22 ` Daniel Lezcano
2024-09-06 18:56 ` [tip: timers/core] clocksource/drivers/qcom: " tip-bot2 for 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=20240713102820.GA430622@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