* [PATCH v2 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04 8:49 Peter Chen
0 siblings, 0 replies; only message in thread
From: Peter Chen @ 2016-07-04 8:49 UTC (permalink / raw)
To: airlied, robdclark
Cc: dri-devel, linux-arm-msm, freedreno, linux-kernel, Peter Chen
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>
---
Changes for v2:
- There are two missings in the code, handle it both in one patch
drivers/gpu/drm/msm/msm_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 9c65409..46c6037 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -284,6 +284,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;
@@ -819,6 +820,7 @@ static int add_components(struct device *dev, struct component_match **matchptr,
break;
component_match_add(dev, matchptr, compare_of, node);
+ of_node_put(node);
}
return 0;
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-04 8:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-04 8:49 [PATCH v2 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle Peter Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).