[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220915165103.GA149@VICKYMQLIN-NB1.localdomain>
Date: Fri, 16 Sep 2022 00:51:03 +0800
From: Miaoqian Lin <linmq006@...il.com>
To: Liang He <windhl@....com>
Cc: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2] of: mdio: Add of_node_put() when breaking out of
for_each_xx
On Tue, Sep 13, 2022 at 11:13:20PM +0800, Liang He wrote:
>
>
>
> At 2022-09-13 20:56:59, "Liang He" <windhl@....com> wrote:
> >In of_mdiobus_register(), we should call of_node_put() for 'child'
> >escaped out of for_each_available_child_of_node().
> >
> >Fixes: 66bdede495c7 ("of_mdio: Fix broken PHY IRQ in case of probe deferral")
> >Cc: Miaoqian Lin <linmq006@...il.com>
> >Co-developed-by: Miaoqian Lin <linmq006@...il.com>
> >Signed-off-by: Liang He <windhl@....com>
> >Signed-off-by: Miaoqian Lin <linmq006@...il.com>
Signed-off-by: Miaoqian Lin <linmq006@...il.com>
>
> Hi, Miaoqian,
> this Sob should directly from you,
> please do it!
>
>
> >---
> > v2: use proper tag advised by Jakub Kicinski
> > v1: fix the bug
> >
> > drivers/net/mdio/of_mdio.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
> >index 9e3c815a070f..796e9c7857d0 100644
> >--- a/drivers/net/mdio/of_mdio.c
> >+++ b/drivers/net/mdio/of_mdio.c
> >@@ -231,6 +231,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
> > return 0;
> >
> > unregister:
> >+ of_node_put(child);
> > mdiobus_unregister(mdio);
> > return rc;
> > }
> >--
> >2.25.1
Powered by blists - more mailing lists