lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1467622190-17442-1-git-send-email-peter.chen@nxp.com>
Date:	Mon, 4 Jul 2016 16:49:50 +0800
From:	Peter Chen <peter.chen@....com>
To:	<airlied@...ux.ie>, <robdclark@...il.com>
CC:	<dri-devel@...ts.freedesktop.org>, <linux-arm-msm@...r.kernel.org>,
	<freedreno@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
	Peter Chen <peter.chen@....com>
Subject: [PATCH v2 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle

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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ