summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/apm
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-10-19 09:41:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-03 17:59:15 +0300
commit1e0bee973ef6fc3c1e3acb014515eaea37c8fa17 (patch)
treec751b6e7d34a86be1c106972310083384fde92f6 /drivers/net/ethernet/apm
parent7a939503fc32bff4ed60800b73ff7fbb4aea2142 (diff)
downloadlinux-1e0bee973ef6fc3c1e3acb014515eaea37c8fa17.tar.xz
net: netsec: fix error handling in netsec_register_mdio()
[ Upstream commit 94423589689124e8cd145b38a1034be7f25835b2 ] If phy_device_register() fails, phy_device_free() need be called to put refcount, so memory of phy device and device name can be freed in callback function. If get_phy_device() fails, mdiobus_unregister() need be called, or it will cause warning in mdiobus_free() and kobject is leaked. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20221019064104.3228892-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/apm')
0 files changed, 0 insertions, 0 deletions