Patch "rtc: mxc_v2: Add missing clk_disable_unprepare()" has been added to the 4.19-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: mxc_v2: Add missing clk_disable_unprepare()

to the 4.19-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-mxc_v2-add-missing-clk_disable_unprepare.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 79b368b03fdc169856508e12738e2b54d8884698
Author: GUO Zihua <guozihua@xxxxxxxxxx>
Date:   Tue Nov 22 16:50:46 2022 +0800

    rtc: mxc_v2: Add missing clk_disable_unprepare()
    
    [ Upstream commit 55d5a86618d3b1a768bce01882b74cbbd2651975 ]
    
    The call to clk_disable_unprepare() is left out in the error handling of
    devm_rtc_allocate_device. Add it back.
    
    Fixes: 5490a1e018a4 ("rtc: mxc_v2: fix possible race condition")
    Signed-off-by: GUO Zihua <guozihua@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221122085046.21689-1-guozihua@xxxxxxxxxx
    Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
index 45c7366b7286..c16aa4a389e9 100644
--- a/drivers/rtc/rtc-mxc_v2.c
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -335,8 +335,10 @@ static int mxc_rtc_probe(struct platform_device *pdev)
 	}
 
 	pdata->rtc = devm_rtc_allocate_device(&pdev->dev);
-	if (IS_ERR(pdata->rtc))
+	if (IS_ERR(pdata->rtc)) {
+		clk_disable_unprepare(pdata->clk);
 		return PTR_ERR(pdata->rtc);
+	}
 
 	pdata->rtc->ops = &mxc_rtc_ops;
 	pdata->rtc->range_max = U32_MAX;



[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