android_kernel_motorola_sm6375/net/dsa
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Wen Yang 9919a363a5 net: dsa: fix a leaked reference by adding missing of_node_put
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 line 284, but without a corresponding object release within this function.
./net/dsa/dsa2.c:627:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 618, but without a corresponding object release within this function.
./net/dsa/dsa2.c:630:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 618, but without a corresponding object release within this function.
./net/dsa/dsa2.c:636:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 618, but without a corresponding object release within this function.
./net/dsa/dsa2.c:639:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 618, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-25 09:34:52 -08:00
..
dsa.c net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 2018-12-16 14:23:33 -08:00
dsa2.c net: dsa: fix a leaked reference by adding missing of_node_put 2019-02-25 09:34:52 -08:00
dsa_priv.h net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 2018-12-16 14:23:33 -08:00
Kconfig net: dsa: ksz: Rename NET_DSA_TAG_KSZ to _KSZ9477 2018-12-16 14:23:33 -08:00
legacy.c
Makefile
master.c net: dsa: Fix lockdep false positive splat 2019-02-04 18:30:43 -08:00
port.c net: dsa: fix a leaked reference by adding missing of_node_put 2019-02-25 09:34:52 -08:00
slave.c net: dsa: Fix NULL checking in dsa_slave_set_eee() 2019-02-06 13:42:54 -08:00
switch.c
tag_brcm.c
tag_dsa.c
tag_edsa.c
tag_gswip.c
tag_ksz.c net: dsa: ksz: Add STP multicast handling 2018-12-16 14:23:33 -08:00
tag_lan9303.c
tag_mtk.c
tag_qca.c
tag_trailer.c