Commit 0e0d6222 authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Greg Kroah-Hartman

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

[ Upstream commit f8794fea ]

Since commit 65f037e8 ("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: 65f037e8 ("drm/etnaviv: add support for slave interface clock")
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8b6e1f79
......@@ -1465,7 +1465,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) {
......@@ -1488,6 +1488,9 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment