diff options
| author | 2022-10-19 14:41:04 +0800 | |
|---|---|---|
| committer | 2022-10-20 21:08:41 -0700 | |
| commit | 94423589689124e8cd145b38a1034be7f25835b2 (patch) | |
| tree | 148c85709df2e9a986384590c826d006eb4d0ac1 /drivers/net/netdevsim/git:/ssh:/git@git.zx2c4.com | |
| parent | tipc: fix a null-ptr-deref in tipc_topsrv_accept (diff) | |
| download | linux-dev-94423589689124e8cd145b38a1034be7f25835b2.tar.xz linux-dev-94423589689124e8cd145b38a1034be7f25835b2.zip | |
net: netsec: fix error handling in netsec_register_mdio()
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>
Diffstat (limited to 'drivers/net/netdevsim/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
