Skip to content

Commit c04c314

Browse files
Yuuoniylumag
authored andcommitted
drm/msm/dsi: Fix missing put_device() call in dsi_get_phy
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 <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 84d46e1 commit c04c314

File tree

1 file changed

+6
-1
lines changed
  • drivers/gpu/drm/msm/dsi

1 file changed

+6
-1
lines changed

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

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

4141
of_node_put(phy_node);
4242

43-
if (!phy_pdev || !msm_dsi->phy) {
43+
if (!phy_pdev) {
44+
DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
45+
return -EPROBE_DEFER;
46+
}
47+
if (!msm_dsi->phy) {
48+
put_device(&phy_pdev->dev);
4449
DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
4550
return -EPROBE_DEFER;
4651
}

0 commit comments

Comments
 (0)