From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: patrice.chotard@foss.st.com, a.zummo@towertech.it,
lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH] rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
Date: Tue, 22 Nov 2022 14:45:11 +0100 [thread overview]
Message-ID: <Y3zSZ3ixpiEnsow1@mail.local> (raw)
In-Reply-To: <20221122121907.1648044-1-cuigaosheng1@huawei.com>
On 22/11/2022 20:19:07+0800, Gaosheng Cui wrote:
> The clk_get_rate() should be called in the error handling of
> clk_get_rate(), fix it.
>
This is not what the patch does
> Fixes: b5b2bdfc2893 ("rtc: st: Add new driver for ST's LPC RTC")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
> drivers/rtc/rtc-st-lpc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c
> index bdb20f63254e..0f8e4231098e 100644
> --- a/drivers/rtc/rtc-st-lpc.c
> +++ b/drivers/rtc/rtc-st-lpc.c
> @@ -238,6 +238,7 @@ static int st_rtc_probe(struct platform_device *pdev)
>
> rtc->clkrate = clk_get_rate(rtc->clk);
> if (!rtc->clkrate) {
> + clk_disable_unprepare(rtc->clk);
> dev_err(&pdev->dev, "Unable to fetch clock rate\n");
> return -EINVAL;
> }
> --
> 2.25.1
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2022-11-22 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 12:19 [PATCH] rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe() Gaosheng Cui
2022-11-22 13:45 ` Alexandre Belloni [this message]
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=Y3zSZ3ixpiEnsow1@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=cuigaosheng1@huawei.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=patrice.chotard@foss.st.com \
/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;
as well as URLs for NNTP newsgroup(s).