diff options
| author | Konrad Dybcio <[email protected]> | 2023-06-20 11:43:20 +0000 |
|---|---|---|
| committer | Dmitry Baryshkov <[email protected]> | 2023-12-03 00:13:18 +0000 |
| commit | 3d07a411b4faaf2b498760ccf12888f8de529de0 (patch) | |
| tree | a658124f5c20f3a2a5383eda54df27981e11c0ff /drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | |
| parent | drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog (diff) | |
| download | kernel-3d07a411b4faaf2b498760ccf12888f8de529de0.tar.gz kernel-3d07a411b4faaf2b498760ccf12888f8de529de0.zip | |
drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
This helper has been introduced to avoid programmer errors (missing
_put calls leading to dangling refcnt) when using pm_runtime_get, use it.
While at it, start checking the return value.
Signed-off-by: Konrad Dybcio <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Fixes: 5c8290284402 ("drm/msm/dsi: Split PHY drivers to separate files")
Patchwork: https://patchwork.freedesktop.org/patch/543350/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Baryshkov <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/phy/dsi_phy.c')
| -rw-r--r-- | drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 05621e5e7d63..b6314bb66d2f 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -516,7 +516,9 @@ static int dsi_phy_enable_resource(struct msm_dsi_phy *phy) struct device *dev = &phy->pdev->dev; int ret; - pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret) + return ret; ret = clk_prepare_enable(phy->ahb_clk); if (ret) { |
