drm/sun4i: dw-hdmi: Fix missing put_device() call in sun8i_hdmi_phy_get
Subsystems (5)
DRM drivers DRM misc Arm/Allwinner sunXi SoC support DRM drivers for Allwinner A10 +1 more subsystems
PATCH 1/1 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 9bf3797796f5 ("drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device")
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c +3 -1
@@ -658,8 +658,10 @@ int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node)return -EPROBE_DEFER ; phy =platform_get_drvdata (pdev); -if (!phy) +if (!phy) { +put_device (&pdev->dev);return -EPROBE_DEFER ; + } hdmi->phy = phy;
Signature · 1 line
2.17.1
Maxime Ripard
AppliedRe: (subset) [PATCH] drm/sun4i: dw-hdmi: Fix missing put_device() call in sun8i_hdmi_phy_get
Quoted 5 lines · Miaoqian Lin
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.
Applied to drm/drm-misc (drm-misc-fixes).
Thanks!
Maxime