Re: [PATCH] net: hns: hns_enet: Add of_node_put in hns_nic_dev_probe()

2019-08-15 Thread Yonglong Liu
On 2019/8/15 14:28, Nishka Dasgupta wrote: > The local variable ae_node in function hns_nic_dev_probe takes the > return value of of_parse_phandle, which gets a node but does not put it. > This may cause a memory leak. Hence put ae_node after the last time it > is invoked. > Issue found with Coc

[PATCH] net: hns: hns_enet: Add of_node_put in hns_nic_dev_probe()

2019-08-14 Thread Nishka Dasgupta
The local variable ae_node in function hns_nic_dev_probe takes the return value of of_parse_phandle, which gets a node but does not put it. This may cause a memory leak. Hence put ae_node after the last time it is invoked. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/n