drm/msm: add missing of_node_put after calling of_parse_phandle
authorPeter Chen <peter.chen@nxp.com>
Mon, 4 Jul 2016 08:49:50 +0000 (16:49 +0800)
committerRob Clark <robdclark@gmail.com>
Sat, 16 Jul 2016 14:29:30 +0000 (10:29 -0400)
of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
[rebased on top of Archit's DT rework, so looses one hunk]
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_drv.c

index 9cfa348fd2bb7f18588e22e37612a24e20a6a3c1..26f859ec24b3888ac6b5d45ab01405c9b9a31cbb 100644 (file)
@@ -294,6 +294,7 @@ static int msm_init_vram(struct drm_device *dev)
        if (node) {
                struct resource r;
                ret = of_address_to_resource(node, 0, &r);
+               of_node_put(node);
                if (ret)
                        return ret;
                size = r.end - r.start;