Commit 7e6c62c1 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by zhaoxiaoqiang11
Browse files

net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe

stable inclusion
from stable-v5.10.163
commit 106d0d33c9d1ec4ddeeffc1fdc717ff09953d4ed
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7PJ9N

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



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

[ Upstream commit d0395358 ]

of_phy_find_device() return device node with refcount incremented.
Call put_device() to relese it when not needed anymore.

Fixes: ab4e6ee5 ("net: phy: xgmiitorgmii: Check phy_driver ready before accessing")
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 avatarzhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com>
parent dedb86f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment