[PATCH v5 02/15] drm/rockchip: vop2: Fix resource leak on vop2_enable() error path

Daniel Stone daniel at fooishbar.org
Fri Oct 30 04:34:33 PDT 2026


On Tue, 13 Oct 2026 at 23:51, Cristian Ciocaltea
<cristian.ciocaltea at collabora.com> 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 at collabora.com>



More information about the linux-arm-kernel mailing list