Patch "mmc: mtk-sd: Fix missing clk_disable_unprepare in msdc_of_clock_parse()" has been added to the 5.15-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

    mmc: mtk-sd: Fix missing clk_disable_unprepare in msdc_of_clock_parse()

to the 5.15-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:
     mmc-mtk-sd-fix-missing-clk_disable_unprepare-in-msdc.patch
and it can be found in the queue-5.15 subdirectory.

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



commit d0ae18a75ad239738af5cbd3b85d0bddf1d3ef2e
Author: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
Date:   Fri Nov 25 17:01:41 2022 +0800

    mmc: mtk-sd: Fix missing clk_disable_unprepare in msdc_of_clock_parse()
    
    [ Upstream commit c61bfb1cb63ddab52b31cf5f1924688917e61fad ]
    
    The clk_disable_unprepare() should be called in the error handling
    of devm_clk_bulk_get_optional, fix it by replacing devm_clk_get_optional
    and clk_prepare_enable by devm_clk_get_optional_enabled.
    
    Fixes: f5eccd94b63f ("mmc: mediatek: Add subsys clock control for MT8192 msdc")
    Signed-off-by: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20221125090141.3626747-1-cuigaosheng1@xxxxxxxxxx
    Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 99d8881a7d6c..9871c19d2b4e 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2455,13 +2455,11 @@ static int msdc_of_clock_parse(struct platform_device *pdev,
 	if (IS_ERR(host->src_clk_cg))
 		host->src_clk_cg = NULL;
 
-	host->sys_clk_cg = devm_clk_get_optional(&pdev->dev, "sys_cg");
+	/* If present, always enable for this clock gate */
+	host->sys_clk_cg = devm_clk_get_optional_enabled(&pdev->dev, "sys_cg");
 	if (IS_ERR(host->sys_clk_cg))
 		host->sys_clk_cg = NULL;
 
-	/* If present, always enable for this clock gate */
-	clk_prepare_enable(host->sys_clk_cg);
-
 	host->bulk_clks[0].id = "pclk_cg";
 	host->bulk_clks[1].id = "axi_cg";
 	host->bulk_clks[2].id = "ahb_cg";



[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