Re: [PATCH v5 02/15] drm/rockchip: vop2: Fix resource leak on vop2_enable() error path
From: Daniel Stone
Date: Fri Oct 30 2026 - 07:38:00 EST
On Tue, 13 Oct 2026 at 23:51, Cristian Ciocaltea
<cristian.ciocaltea@xxxxxxxxxxxxx> wrote:
> vop2_enable() returns void, so callers cannot tell whether powering up
> the VOP2 succeeded.
>
> Additionally, if rockchip_drm_dma_attach_device() fails, vop2_enable()
> returns without disabling the core clocks or dropping the runtime PM
> reference taken earlier, leaking both.
>
> Make vop2_enable() return int and unwind all resources on every failure
> path. As disabling the core clocks is also needed in vop2_disable(),
> factor it out into a local helper used by both.
Reviewed-by: Daniel Stone <daniels@xxxxxxxxxxxxx>