drm/etnaviv: Fix error path on failure to enable bus clk

Since commit 65f037e8e9 ("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: 65f037e8e9 ("drm/etnaviv: add support for slave interface clock")
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
Lubomir Rintel 2020-06-16 23:21:24 +02:00 committed by Lucas Stach
parent 86824e60b0
commit f8794feaf6
1 changed files with 4 additions and 1 deletions

View File

@ -1496,7 +1496,7 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu)
if (gpu->clk_bus) {
ret = clk_prepare_enable(gpu->clk_bus);
if (ret)
return ret;
goto disable_clk_reg;
}
if (gpu->clk_core) {
@ -1519,6 +1519,9 @@ disable_clk_core:
disable_clk_bus:
if (gpu->clk_bus)
clk_disable_unprepare(gpu->clk_bus);
disable_clk_reg:
if (gpu->clk_reg)
clk_disable_unprepare(gpu->clk_reg);
return ret;
}