Skip to content
Commit 9cc897ca authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Greg Kroah-Hartman
Browse files

net: dsa: Add missing of_node_put() in dsa_port_link_register_of

[ Upstream commit fc06b286 ]

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

Fixes: a20f9970

 ("net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 72e7940b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment