tsnep: Add missing of_node_put() in tsnep_mdio_init()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 24 Nov 2021 08:40:48 +0000 (16:40 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Nov 2021 03:20:34 +0000 (19:20 -0800)
commit739752d655b3a5fa6ea3d72c1b53cec082f86486
tree16716f039cb49e2d24cc5ece9b41643f87d3fc47
parenta0341b73d843143afef52313b9f4470f5523941e
tsnep: Add missing of_node_put() in tsnep_mdio_init()

The node pointer is returned by of_get_child_by_name() with
refcount incremented in tsnep_mdio_init(). Calling of_node_put()
to aovid the refcount leak in tsnep_mdio_init().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20211124084048.175456-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/engleder/tsnep_main.c