linux/drivers/net/phy
Jianglei Nie 67dc32542a net: sfp: fix memory leak in sfp_probe()
[ Upstream commit 0a18d802d6 ]

sfp_probe() allocates a memory chunk from sfp with sfp_alloc(). When
devm_add_action() fails, sfp is not freed, which leads to a memory leak.

We should use devm_add_action_or_reset() instead of devm_add_action().

Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20220629075550.2152003-1-niejianglei2021@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-21 21:20:15 +02:00
..
mscc net: phy: mscc: Add MODULE_FIRMWARE macros 2022-03-23 09:13:28 +01:00
adin.c
amd.c
aquantia_hwmon.c
aquantia_main.c phy: aquantia: Fix AN when higher speeds than 1G are not advertised 2022-06-29 08:59:47 +02:00
aquantia.h
at803x.c
ax88796b.c
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h
bcm7xxx.c net: phy: bcm7xxx: Fixed indirect MMD operations 2021-10-06 15:55:58 +02:00
bcm63xx.c
bcm87xx.c
bcm54140.c
bcm84881.c
broadcom.c net: phy: broadcom: Fix brcm_fet_config_init() 2022-04-08 14:40:29 +02:00
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83640_reg.h ptp: dp83640: don't define PAGE0 2021-09-22 12:27:56 +02:00
dp83640.c
dp83822.c net: dp83822: disable rx error interrupt 2022-07-07 17:52:17 +02:00
dp83848.c
dp83867.c net: phy: dp83867: retrigger SGMII AN when link change 2022-06-14 18:32:45 +02:00
dp83869.c
et1011c.c
fixed_phy.c
icplus.c
intel-xway.c net: phy: intel-xway: enable integrated led functions 2021-05-14 09:50:41 +02:00
Kconfig
linkmode.c
lxt.c
Makefile
marvell.c net: phy: marvell: Fix invalid comparison in the resume and suspend functions 2022-03-23 09:13:27 +01:00
marvell10g.c net: phy: marvell10g: fix return value on error 2022-05-09 09:05:05 +02:00
mdio_bus.c net: mdio: unexport __init-annotated mdio_bus_init() 2022-06-14 18:32:40 +02:00
mdio_device.c net: mdio: introduce a shutdown method to mdio device drivers 2021-10-09 14:40:56 +02:00
mdio_devres.c
mdio-boardinfo.c
mdio-boardinfo.h
meson-gxl.c
micrel.c net: phy: micrel: Allow probing without .driver_data 2022-06-09 10:20:55 +02:00
microchip_t1.c
microchip.c
mii_timestamper.c
national.c
nxp-tja11xx.c
phy_device.c phylib: fix potential use-after-free 2022-02-01 17:25:45 +01:00
phy_led_triggers.c
phy-c45.c
phy-core.c net: phy: prefer 1000baseT over 1000baseKX 2022-01-27 10:54:15 +01:00
phy.c net: phy: Fix race condition on link status change 2022-05-18 10:23:48 +02:00
phylink.c net: phylink: Force retrigger in case of latched link-fail indicator 2021-12-01 09:19:07 +01:00
qsemi.c
realtek.c net: phy: realtek: add delay to fix RXC generation issue 2021-07-19 09:44:49 +02:00
rockchip.c
sfp-bus.c net: sfp: add 2500base-X quirk for Lantech SFP module 2022-04-13 21:01:00 +02:00
sfp.c net: sfp: fix memory leak in sfp_probe() 2022-07-21 21:20:15 +02:00
sfp.h
smsc.c net: phy: lan87xx: fix access to wrong register of LAN87xx 2021-05-14 09:50:31 +02:00
spi_ks8995.c
ste10Xp.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c