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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1469586048-15697-10-git-send-email-peter.chen@nxp.com>
Date:	Wed, 27 Jul 2016 10:20:42 +0800
From:	Peter Chen <peter.chen@....com>
To:	<davem@...emloft.net>
CC:	<netdev@...r.kernel.org>, <vbridger@...nsource.altera.com>,
	<isubramanian@....com>, <kchudgar@....com>,
	<yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
	<thomas.petazzoni@...e-electrons.com>,
	<sergei.shtylyov@...entembedded.com>, <peppe.cavallaro@...com>,
	<alexandre.torgue@...com>, <mugunthanvnm@...com>,
	<tremyfr@...il.com>, <wxt@...k-chips.com>, <arnd@...db.de>,
	<david.daney@...ium.com>, <huangdaode@...ilicon.com>,
	<jszhang@...vell.com>, Peter Chen <peter.chen@....com>
Subject: [PATCH 09/15] ethernet: marvell: mvpp2: 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>
---
 drivers/net/ethernet/marvell/mvpp2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 0b04717..a86f22b 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -5531,6 +5531,7 @@ static int mvpp2_phy_connect(struct mvpp2_port *port)
 
 	phy_dev = of_phy_connect(port->dev, port->phy_node, mvpp2_link_event, 0,
 				 port->phy_interface);
+	of_node_put(port->phy_node);
 	if (!phy_dev) {
 		netdev_err(port->dev, "cannot connect to phy\n");
 		return -ENODEV;
@@ -6234,6 +6235,7 @@ err_free_stats:
 err_free_irq:
 	irq_dispose_mapping(port->irq);
 err_free_netdev:
+	of_node_put(phy_node);
 	free_netdev(dev);
 	return err;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ