Re: [PATCH] drm/msm/a6xx: fix error unwind in a6xx_gmu_wrapper_init()

From: Konrad Dybcio

Date: Mon Nov 30 2026 - 06:13:26 EST


On 11/20/26 8:24 PM, Elkin Cruz wrote:
> a6xx_gmu_wrapper_init() has three error-unwind bugs when initialization
> fails before gmu->initialized = true:
> 1) When a6xx_gmu_get_mmio() returns an ERR_PTR, goto err_mmio passes
> the error pointer directly to iounmap(gmu->mmio). Jump to err_clk
> instead.
> 2) When dev_pm_domain_attach_by_name(gmu->dev, "gx") returns an ERR_PTR
> (such as -EPROBE_DEFER), goto err_mmio skips detach_cxpd, leaking the
> attached gmu->cxpd domain and its runtime PM device link. Jump to
> detach_cxpd instead.
> 3) err_clk: drops the gmu->dev reference without calling
> pm_runtime_disable(gmu->dev) to balance pm_runtime_enable(gmu->dev),
> causing an unbalanced pm_runtime_enable() warning on the surviving
> GMU platform device across -EPROBE_DEFER retries. Call
> pm_runtime_disable(gmu->dev) at err_clk: before put_device(gmu->dev).
>
> Fixes: 5a903a44a984 ("drm/msm/a6xx: Introduce GMU wrapper support")
> Fixes: 15cc59ac954e ("drm/msm/a6xx: Add support for Adreno 612")
> Signed-off-by: Elkin Cruz <elkin@xxxxxxxxxx>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad