Commit 95497337 authored by Liang He's avatar Liang He Committed by Zheng Zengkai
Browse files

net: ftgmac100: Hold reference returned by of_get_child_by_name()

stable inclusion
from stable-v5.10.132
commit 29c6a632f8193b0a4b40156afb823371d1d4c05a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5YS3T

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



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

[ Upstream commit 49b9f431 ]

In ftgmac100_probe(), we should hold the refernece returned by
of_get_child_by_name() and use it to call of_node_put() for
reference balance.

Fixes: 39bfab88 ("net: ftgmac100: Add support for DT phy-handle property")
Signed-off-by: default avatarLiang He <windhl@126.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 1fe157dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment