]> git.itanic.dy.fi Git - linux-stable/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 10:59:13 +0000 (11:59 +0100)
commit4d112f001612c79927c1ecf29522b34c4fa292e0
tree5b05d5326af27b3505947356ebc47acb7129a86e
parente5fbeb3d16b44c91063fe0bc951d0182b5699388
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