]> git.baikalelectronics.ru Git - kernel.git/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>
Wed, 18 Jan 2023 10:41:57 +0000 (11:41 +0100)
commit22d5f01f057605e63b39f0ebaae92eb51cbeebb1
tree02f05dbc704fcb73cddd4faa55a5e81ca438a9c5
parentb9377812a40441fbd87323aca5f9bfee62704bfd
net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe

[ Upstream commit 097cb61caf9672ad1ec7f85a61b25d7fa5215937 ]

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

Fixes: 7cddd9b6735f ("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