Patch "memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe()" has been added to the 5.4-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

    memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe()

to the 5.4-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:
     memory-mvebu-devbus-fix-missing-clk_disable_unprepar.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 7f23f601a0b78308598c1a264fb580871e544b20
Author: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
Date:   Sat Nov 26 12:49:11 2022 +0800

    memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe()
    
    [ Upstream commit cb8fd6f75775165390ededea8799b60d93d9fe3e ]
    
    The clk_disable_unprepare() should be called in the error handling
    of devbus_get_timing_params() and of_platform_populate(), fix it by
    replacing devm_clk_get and clk_prepare_enable by devm_clk_get_enabled.
    
    Fixes: e81b6abebc87 ("memory: add a driver for atmel ram controllers")
    Signed-off-by: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221126044911.7226-1-cuigaosheng1@xxxxxxxxxx
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c
index 095f8a3b2cfc..9bf477b000c0 100644
--- a/drivers/memory/mvebu-devbus.c
+++ b/drivers/memory/mvebu-devbus.c
@@ -282,10 +282,9 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
 	if (IS_ERR(devbus->base))
 		return PTR_ERR(devbus->base);
 
-	clk = devm_clk_get(&pdev->dev, NULL);
+	clk = devm_clk_get_enabled(&pdev->dev, NULL);
 	if (IS_ERR(clk))
 		return PTR_ERR(clk);
-	clk_prepare_enable(clk);
 
 	/*
 	 * Obtain clock period in picoseconds,



[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