[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <HE1PR04MB145066B58D8B26F0E4CADA488B0F0@HE1PR04MB1450.eurprd04.prod.outlook.com>
Date: Wed, 27 Jul 2016 07:43:58 +0000
From: Peter Chen <peter.chen@....com>
To: Mugunthan V N <mugunthanvnm@...com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"vbridger@...nsource.altera.com" <vbridger@...nsource.altera.com>,
"isubramanian@....com" <isubramanian@....com>,
"kchudgar@....com" <kchudgar@....com>,
"yisen.zhuang@...wei.com" <yisen.zhuang@...wei.com>,
"salil.mehta@...wei.com" <salil.mehta@...wei.com>,
"thomas.petazzoni@...e-electrons.com"
<thomas.petazzoni@...e-electrons.com>,
"sergei.shtylyov@...entembedded.com"
<sergei.shtylyov@...entembedded.com>,
"peppe.cavallaro@...com" <peppe.cavallaro@...com>,
"alexandre.torgue@...com" <alexandre.torgue@...com>,
"tremyfr@...il.com" <tremyfr@...il.com>,
"wxt@...k-chips.com" <wxt@...k-chips.com>,
"arnd@...db.de" <arnd@...db.de>,
"david.daney@...ium.com" <david.daney@...ium.com>,
"huangdaode@...ilicon.com" <huangdaode@...ilicon.com>,
"jszhang@...vell.com" <jszhang@...vell.com>
Subject: RE: [PATCH 15/15] ethernet: ti: davinci_emac: add missing of_node_put
after calling of_parse_phandle
>On Wednesday 27 July 2016 07:50 AM, Peter Chen wrote:
>> 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/ti/davinci_emac.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/ethernet/ti/davinci_emac.c
>> b/drivers/net/ethernet/ti/davinci_emac.c
>> index c6c5465..d8cb9d0 100644
>> --- a/drivers/net/ethernet/ti/davinci_emac.c
>> +++ b/drivers/net/ethernet/ti/davinci_emac.c
>> @@ -1571,6 +1571,7 @@ static int emac_dev_open(struct net_device *ndev)
>> if (priv->phy_node) {
>> phydev = of_phy_connect(ndev, priv->phy_node,
>> &emac_adjust_link, 0, 0);
>> + of_node_put(priv->phy_node);
>> if (!phydev) {
>> dev_err(emac_dev, "could not connect to phy %s\n",
>> priv->phy_node->full_name);
>>
>
>phy_node is accessed in case of of_phy_connect() returns error, so it has to be
>moved after the dev_err log
>
Yeah, you are right. I will change it, thanks.
Peter
Powered by blists - more mailing lists