[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1470034963-30506-6-git-send-email-peter.chen@nxp.com>
Date: Mon, 1 Aug 2016 15:02:33 +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 v2 05/15] ethernet: cavium: octeon: 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/cavium/octeon/octeon_mgmt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index e8bc15b..4ab404f 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -1513,6 +1513,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
return 0;
err:
+ of_node_put(p->phy_np);
free_netdev(netdev);
return result;
}
@@ -1520,8 +1521,10 @@ err:
static int octeon_mgmt_remove(struct platform_device *pdev)
{
struct net_device *netdev = platform_get_drvdata(pdev);
+ struct octeon_mgmt *p = netdev_priv(netdev);
unregister_netdev(netdev);
+ of_node_put(p->phy_np);
free_netdev(netdev);
return 0;
}
--
1.9.1
Powered by blists - more mailing lists