Skip to content

Commit 4164843

Browse files
tititiou36Abhinav Kumar
authored andcommitted
drm/msm/hdmi: Fix the error handling path of msm_hdmi_dev_probe()
If an error occurs after a successful msm_hdmi_get_phy() call, it must be undone by a corresponding msm_hdmi_put_phy(), as already done in the remove function. Fixes: 4373654 ("drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/514847/ Link: https://lore.kernel.org/r/b3f9da097851e2e42a40dc61458aa98c41c88d0d.1670741386.git.christophe.jaillet@wanadoo.fr Signed-off-by: Abhinav Kumar <[email protected]>
1 parent 45dac13 commit 4164843

File tree

1 file changed

+10
-2
lines changed
  • drivers/gpu/drm/msm/hdmi

1 file changed

+10
-2
lines changed

drivers/gpu/drm/msm/hdmi/hdmi.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,19 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev)
532532

533533
ret = devm_pm_runtime_enable(&pdev->dev);
534534
if (ret)
535-
return ret;
535+
goto err_put_phy;
536536

537537
platform_set_drvdata(pdev, hdmi);
538538

539-
return component_add(&pdev->dev, &msm_hdmi_ops);
539+
ret = component_add(&pdev->dev, &msm_hdmi_ops);
540+
if (ret)
541+
goto err_put_phy;
542+
543+
return 0;
544+
545+
err_put_phy:
546+
msm_hdmi_put_phy(hdmi);
547+
return ret;
540548
}
541549

542550
static int msm_hdmi_dev_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)