Patch "drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-msm-dsi-use-pm_runtime_resume_and_get-to-prevent.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 34b0007b25ec6b07de19466154bc8e5398a3986a
Author: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
Date:   Tue Jun 20 13:43:20 2023 +0200

    drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
    
    [ Upstream commit 3d07a411b4faaf2b498760ccf12888f8de529de0 ]
    
    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 <konrad.dybcio@xxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Fixes: 5c8290284402 ("drm/msm/dsi: Split PHY drivers to separate files")
    Patchwork: https://patchwork.freedesktop.org/patch/543350/
    Link: https://lore.kernel.org/r/20230620-topic-dsiphy_rpm-v2-1-a11a751f34f0@xxxxxxxxxx
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
index 7fc0975cb869..62bc3756f2e2 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
@@ -512,7 +512,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) {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux