diff options
author | Gaosheng Cui <cuigaosheng1@huawei.com> | 2022-11-26 12:49:11 +0800 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-12-27 09:54:32 +0100 |
commit | cb8fd6f75775165390ededea8799b60d93d9fe3e (patch) | |
tree | 10c17e4dd8928f7494aa90609a4d4fe7b59beeda | |
parent | 340cb392a038cf70540a4cdf2e98a247c66b6df4 (diff) | |
download | linux-cb8fd6f75775165390ededea8799b60d93d9fe3e.tar.gz linux-cb8fd6f75775165390ededea8799b60d93d9fe3e.tar.bz2 linux-cb8fd6f75775165390ededea8799b60d93d9fe3e.zip |
memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe()
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@huawei.com>
Link: https://lore.kernel.org/r/20221126044911.7226-1-cuigaosheng1@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-rw-r--r-- | drivers/memory/mvebu-devbus.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c index 8450638e8670..efc6c08db2b7 100644 --- a/drivers/memory/mvebu-devbus.c +++ b/drivers/memory/mvebu-devbus.c @@ -280,10 +280,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, |