drm/exynos: gsc: minor fix for loop iteration in gsc_runtime_resume
[ Upstream commit 4050957c7c2c14aa795dbf423b4180d5ac04e113 ] Do not forget to call clk_disable_unprepare() on the first element of ctx->clocks array. Found by Linux Verification Center (linuxtesting.org). Fixes: 8b7d3ec83aba ("drm/exynos: gsc: Convert driver to IPP v2 core API") Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru> Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1a95318e87
commit
449a4eb5b1
1 changed files with 1 additions and 1 deletions
|
@ -1344,7 +1344,7 @@ static int __maybe_unused gsc_runtime_resume(struct device *dev)
|
|||
for (i = 0; i < ctx->num_clocks; i++) {
|
||||
ret = clk_prepare_enable(ctx->clocks[i]);
|
||||
if (ret) {
|
||||
while (--i > 0)
|
||||
while (--i >= 0)
|
||||
clk_disable_unprepare(ctx->clocks[i]);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue