Re: [PATCH 7/8] PCI: mediatek: fix a leaked reference by adding missing of_node_put

2019-02-28 Thread Honghui Zhang
On Wed, 2019-02-27 at 12:40 +0800, Wen Yang wrote: > The call to of_get_next_child returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > irq_domain_add_linear also calls of_node_get to increase refcount, > so irq_domain will not be

[PATCH 7/8] PCI: mediatek: fix a leaked reference by adding missing of_node_put

2019-02-26 Thread Wen Yang
The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. irq_domain_add_linear also calls of_node_get to increase refcount, so irq_domain will not be affected when it is released. Detected by coccinelle with the