net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr
authorMiaoqian Lin <linmq006@gmail.com>
Tue, 8 Mar 2022 07:42:47 +0000 (07:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:23:38 +0000 (14:23 +0100)
commitb7c2fd1d126329340639adfb8dd2938fe4b65df7
tree27f27525d7be3c8ba3588a1ca42e9a918b2ad8f3
parent6e294d389023d3edf23dd6307a09aa367d7e3d6b
net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr

[ Upstream commit c9ffa3e2bc451816ce0295e40063514fabf2bd36 ]

This node pointer is returned by of_find_compatible_node() with
refcount incremented. Calling of_node_put() to aovid the refcount leak.

Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family ASIC devices")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_main.c