Re: [PATCH 1/5] net: dsa: fix a leaked reference by adding a missing of_node_put

2019-02-22 Thread Linus Walleij
On Fri, Feb 22, 2019 at 8:15 AM Wen Yang wrote: > The call to of_get_child_by_name returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./drivers/net/dsa/rtl8366rb.c:510:2-8: ERR

[PATCH 1/5] net: dsa: fix a leaked reference by adding a missing of_node_put

2019-02-21 Thread Wen Yang
The call to of_get_child_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/net/dsa/rtl8366rb.c:510:2-8: ERROR: missing of_node_put; acquired a node pointer with refcou