Skip to content

Commit 3ab44a4

Browse files
Yuuoniygregkh
authored andcommitted
drm/msm/dsi: Fix missing put_device() call in dsi_get_phy
commit c04c314 upstream. If of_find_device_by_node() succeeds, dsi_get_phy() doesn't a corresponding put_device(). Thus add put_device() to fix the exception handling. Fixes: ec31abf ("drm/msm/dsi: Separate PHY to another platform device") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20211230070943.18116-1-linmq006@gmail.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 82c310d commit 3ab44a4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • drivers/gpu/drm/msm/dsi

‎drivers/gpu/drm/msm/dsi/dsi.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ static int dsi_get_phy(struct msm_dsi *msm_dsi)
3333

3434
of_node_put(phy_node);
3535

36-
if (!phy_pdev || !msm_dsi->phy) {
36+
if (!phy_pdev) {
37+
DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
38+
return -EPROBE_DEFER;
39+
}
40+
if (!msm_dsi->phy) {
41+
put_device(&phy_pdev->dev);
3742
DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
3843
return -EPROBE_DEFER;
3944
}

0 commit comments

Comments
 (0)