Skip to content

Commit f8794fe

Browse files
lkundraklynxeye-dev
authored andcommitted
drm/etnaviv: Fix error path on failure to enable bus clk
Since commit 65f037e ("drm/etnaviv: add support for slave interface clock") the reg clock is enabled before the bus clock and we need to undo its enablement on error. Fixes: 65f037e ("drm/etnaviv: add support for slave interface clock") Signed-off-by: Lubomir Rintel <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
1 parent 86824e6 commit f8794fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu)
14961496
if (gpu->clk_bus) {
14971497
ret = clk_prepare_enable(gpu->clk_bus);
14981498
if (ret)
1499-
return ret;
1499+
goto disable_clk_reg;
15001500
}
15011501

15021502
if (gpu->clk_core) {
@@ -1519,6 +1519,9 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu)
15191519
disable_clk_bus:
15201520
if (gpu->clk_bus)
15211521
clk_disable_unprepare(gpu->clk_bus);
1522+
disable_clk_reg:
1523+
if (gpu->clk_reg)
1524+
clk_disable_unprepare(gpu->clk_reg);
15221525

15231526
return ret;
15241527
}

0 commit comments

Comments
 (0)