Re: [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure
From: Konrad Dybcio
Date: Fri Sep 11 2026 - 12:06:36 EST
On 9/11/26 12:29 PM, Krzysztof Kozlowski wrote:
> If msm_hdmi_phy_resource_enable() fails, e.g. when enabling regulators,
> it should reverse the state of things already changed.
> msm_hdmi_phy_resource_enable() is used also in probe path, thus such
> failure, which could be simple deferred probe, would leave these
> resources permanently enabled for the rest of the runtime.
>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Fixes: 15b4a4523859 ("drm/msm/hdmi: Create a separate HDMI PHY driver")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
> ---
[...]
> +err_clk_unprepare:
> + for (; i > 0; i--)
> + clk_disable_unprepare(phy->clks[i - 1]);
> + regulator_bulk_disable(cfg->num_regs, phy->regs);
> +
> +err_pm_put:
> + pm_runtime_put_sync(dev);
This can apparently fail too.. one more argument for PM_RUNTIME_ACQUIRE_xxx
Konrad