mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
drm/msm/hdmi_phy: fix runtime PM cleanup on probe failure
msm_hdmi_phy_probe() enables runtime PM before enabling the PHY
resources and initializing the PLL, but failures from either operation
return without calling the matching pm_runtime_disable().
The remove path disables runtime PM, but it is not called when probe
fails. As a result, runtime PM remains enabled after an unsuccessful
probe.
Route failures after pm_runtime_enable() through a common error path
and disable runtime PM before returning.
This issue was found by manual code inspection.
Fixes: 15b4a45238 ("drm/msm/hdmi: Create a separate HDMI PHY driver")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/753043/
Link: https://lore.kernel.org/r/20260913085814.1509352-1-lgs201920130244@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
parent
2028280686
commit
f4fae975db
|
|
@ -168,13 +168,13 @@ static int msm_hdmi_phy_probe(struct platform_device *pdev)
|
|||
|
||||
ret = msm_hdmi_phy_resource_enable(phy);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_pm_disable;
|
||||
|
||||
ret = msm_hdmi_phy_pll_init(pdev, phy->cfg->type);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(dev, "couldn't init PLL\n");
|
||||
msm_hdmi_phy_resource_disable(phy);
|
||||
return ret;
|
||||
goto err_pm_disable;
|
||||
}
|
||||
|
||||
msm_hdmi_phy_resource_disable(phy);
|
||||
|
|
@ -182,6 +182,10 @@ static int msm_hdmi_phy_probe(struct platform_device *pdev)
|
|||
platform_set_drvdata(pdev, phy);
|
||||
|
||||
return 0;
|
||||
|
||||
err_pm_disable:
|
||||
pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void msm_hdmi_phy_remove(struct platform_device *pdev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user