Re: [PATCH v2] net: dsa: fix a leaked reference by adding missing of_node_put

2019-02-25 Thread David Miller
From: Wen Yang Date: Mon, 25 Feb 2019 15:22:19 +0800 > The call to of_parse_phandle returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./net/dsa/port.c:294:1-7: ERROR: missing

[PATCH v2] net: dsa: fix a leaked reference by adding missing of_node_put

2019-02-24 Thread Wen Yang
The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./net/dsa/port.c:294:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on