Skip to content

Commit c71af3d

Browse files
Yuuoniymripard
authored andcommitted
drm/sun4i: dw-hdmi: Fix missing put_device() call in sun8i_hdmi_phy_get
The reference taken by 'of_find_device_by_node()' must be released when not needed anymore. Add the corresponding 'put_device()' in the error handling path. Fixes: 9bf3797 ("drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device") Signed-off-by: Miaoqian Lin <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 22bf404 commit c71af3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,10 @@ int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
658658
return -EPROBE_DEFER;
659659

660660
phy = platform_get_drvdata(pdev);
661-
if (!phy)
661+
if (!phy) {
662+
put_device(&pdev->dev);
662663
return -EPROBE_DEFER;
664+
}
663665

664666
hdmi->phy = phy;
665667

0 commit comments

Comments
 (0)