Skip to content

Commit cb8fd6f

Browse files
gscuikrzk
authored andcommitted
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: e81b6ab ("memory: add a driver for atmel ram controllers") Signed-off-by: Gaosheng Cui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 340cb39 commit cb8fd6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/memory/mvebu-devbus.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,9 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
280280
if (IS_ERR(devbus->base))
281281
return PTR_ERR(devbus->base);
282282

283-
clk = devm_clk_get(&pdev->dev, NULL);
283+
clk = devm_clk_get_enabled(&pdev->dev, NULL);
284284
if (IS_ERR(clk))
285285
return PTR_ERR(clk);
286-
clk_prepare_enable(clk);
287286

288287
/*
289288
* Obtain clock period in picoseconds,

0 commit comments

Comments
 (0)