]> git.hungrycats.org Git - linux/commit
net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 29 Dec 2022 06:29:25 +0000 (10:29 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:00:38 +0000 (12:00 +0100)
commit52841e71253e6ace72751c72560950474a57d04c
tree242cba958e782943ac1ff39b4fd95101ad0284aa
parent9099912887dc16a01930c9c40a52411db482038d
net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe

[ Upstream commit d039535850ee47079d59527e96be18d8e0daa84b ]

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

Fixes: ab4e6ee578e8 ("net: phy: xgmiitorgmii: Check phy_driver ready before accessing")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/xilinx_gmii2rgmii.c