Re: [PATCH] drm/exynos: fimd: fix clock leak on resume error path
Inki Dae <[email protected]>
| Newsgroups | org.kernel.vger.linux-samsung-soc,org.freedesktop.lists.dri-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAAQKjZM_Vgx-MGNP45-yQhZzV-H2ccLSP6pWYaykU5KxLMVKfQ@mail.gmail.com> |
Hi, 2026년 8월 18일 (화) 오후 9:46, Jiawen Liu <[email protected]>님이 작성: > > From: jiawen <[email protected]> > > exynos_fimd_resume() can fail when clk_prepare_enable() succeeds for > bus_clk but fails for lcd_clk. The function returns the error without > disabling bus_clk, leaving it prepared and enabled. > > Disable bus_clk before returning the error to keep the clock state > balanced. > > Signed-off-by: jiawen <[email protected]> > --- > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c > --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c > @@ -1325,6 +1325,7 @@ > DRM_DEV_ERROR(dev, > "Failed to prepare_enable the lcd clk [%d]\n", > ret); > + clk_disable_unprepare(ctx->bus_clk); The analysis and the fix are correct. exynos_fimd_suspend() disables both clocks, so leaving bus_clk enabled on this error path does leave the refcount unbalanced, and clk_disable_unprepare(ctx->bus_clk) restores the symmetry. Merged. Thanks, Inki Dae > return ret; > } > > >