diff mbox

[2/2] net: ethernet: mediatek: add the missing of_node_put() after node is used done

Message ID 1471086979-23032-2-git-send-email-sean.wang@mediatek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Wang Aug. 13, 2016, 11:16 a.m. UTC
This patch adds the missing of_node_put() after finishing the usage
of of_parse_phandle() or of_node_get() used by fixed_phy.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller Aug. 13, 2016, 9:59 p.m. UTC | #1
From: Sean Wang <sean.wang@mediatek.com>
Date: Sat, 13 Aug 2016 19:16:19 +0800

> This patch adds the missing of_node_put() after finishing the usage
> of of_parse_phandle() or of_node_get() used by fixed_phy.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Applied.
diff mbox

Patch

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index f5d2745..88b04dd 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -269,6 +269,8 @@  static int mtk_phy_connect(struct mtk_mac *mac)
 				    ADVERTISED_Autoneg;
 	phy_start_aneg(mac->phy_dev);
 
+	of_node_put(np);
+
 	return 0;
 }