gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
authorPeter Chen <peter.chen@nxp.com>
Tue, 5 Jul 2016 02:04:49 +0000 (10:04 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Jul 2016 13:43:35 +0000 (15:43 +0200)
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1467684294-20111-3-git-send-email-peter.chen@nxp.com
drivers/gpu/drm/sti/sti_compositor.c

index 794148ff0e5755339f8a6a1bdfdac643b6d87e1f..bd74732ea09b0a0b97923138955913e5463bf91f 100644 (file)
@@ -267,10 +267,12 @@ static int sti_compositor_probe(struct platform_device *pdev)
        vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 0);
        if (vtg_np)
                compo->vtg_main = of_vtg_find(vtg_np);
+       of_node_put(vtg_np);
 
        vtg_np = of_parse_phandle(pdev->dev.of_node, "st,vtg", 1);
        if (vtg_np)
                compo->vtg_aux = of_vtg_find(vtg_np);
+       of_node_put(vtg_np);
 
        platform_set_drvdata(pdev, compo);