Patch "rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()" has been added to the 4.9-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rtc-st-lpc-add-missing-clk_disable_unprepare-in-st_r.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2492dfbe90cb75037622ac30b9a7d1f6b1683d28
Author: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
Date:   Wed Nov 23 09:48:05 2022 +0800

    rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
    
    [ Upstream commit 5fb733d7bd6949e90028efdce8bd528c6ab7cf1e ]
    
    The clk_disable_unprepare() should be called in the error handling
    of clk_get_rate(), fix it.
    
    Fixes: b5b2bdfc2893 ("rtc: st: Add new driver for ST's LPC RTC")
    Signed-off-by: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221123014805.1993052-1-cuigaosheng1@xxxxxxxxxx
    Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c
index 74c0a336ceea..85756ef63c22 100644
--- a/drivers/rtc/rtc-st-lpc.c
+++ b/drivers/rtc/rtc-st-lpc.c
@@ -249,6 +249,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;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux