Message ID | 1472121901-15629-9-git-send-email-sean.wang@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 25/08/2016 12:44, Sean Wang wrote: > This patch adds the missing of_node_put() after finishing the usage > of of_get_child_by_name. > > Signed-off-by: Sean Wang <sean.wang@mediatek.com> Acked-by: John Crispin <john@phrozen.org> > --- > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > index c573475..e3baa63 100644 > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > @@ -320,6 +320,7 @@ static int mtk_mdio_init(struct mtk_eth *eth) > err = of_mdiobus_register(eth->mii_bus, mii_np); > if (err) > goto err_free_bus; > + of_node_put(mii_np); > > return 0; > >
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index c573475..e3baa63 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -320,6 +320,7 @@ static int mtk_mdio_init(struct mtk_eth *eth) err = of_mdiobus_register(eth->mii_bus, mii_np); if (err) goto err_free_bus; + of_node_put(mii_np); return 0;
This patch adds the missing of_node_put() after finishing the usage of of_get_child_by_name. Signed-off-by: Sean Wang <sean.wang@mediatek.com> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + 1 file changed, 1 insertion(+)