]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Add missing of_node_put() in dsa_port_parse_of
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 16 Mar 2022 08:26:02 +0000 (08:26 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 17 Mar 2022 12:13:27 +0000 (13:13 +0100)
commitc14076b6e391fc280f30821db8c9251b8f002d09
tree86e2f95358eafd628bf2895594859f549f1352e9
parent798f79069659e0e6f1a4daa2b1a96e1c4539111f
net: dsa: Add missing of_node_put() in dsa_port_parse_of

The device_node pointer is returned by of_parse_phandle()  with refcount
incremented. We should use of_node_put() on it when done.

Fixes: 1f0f1d7461e0 ("net: dsa: get port type at parse time")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220316082602.10785-1-linmq006@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/dsa/dsa2.c