Commit 72239597 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Zheng Zengkai
Browse files

net: dsa: Add missing of_node_put() in dsa_port_link_register_of

stable inclusion
from stable-v5.10.114
commit 72ae15d5ce5fd37f3c36fd0a5a3de3cf266c11e8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IY1V

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=72ae15d5ce5fd37f3c36fd0a5a3de3cf266c11e8



--------------------------------

[ 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>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent e141ca5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment