Re: [PATCH] rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux