]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2022 12:16:32 +0000 (12:16 +0000)
commit408a3e0d788f8f17d5ef6b3cb2e611969f9c9882
treef8bc2f4eb2ea6f034dd2c45175bd362cf0dc74a7
parentf718d496412f8d0ba7771d0eab4de1dee291e06e
net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr

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

Fixes: 9c65bff66af7 ("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>
drivers/net/ethernet/marvell/prestera/prestera_main.c