linux/drivers/net/phy
Miaoqian Lin 1e5a541420 net: phy: mediatek: fix nvmem cell reference leak in mt798x_phy_calibration
When nvmem_cell_read() fails in mt798x_phy_calibration(), the function
returns without calling nvmem_cell_put(), leaking the cell reference.

Move nvmem_cell_put() right after nvmem_cell_read() to ensure the cell
reference is always released regardless of the read result.

Found via static analysis and code review.

Fixes: 98c485eaf5 ("net: phy: add driver for MediaTek SoC built-in GE PHYs")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251211081313.2368460-1-linmq006@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-12-22 12:18:54 +01:00
..
aquantia
mediatek
mscc
qcom
realtek
Kconfig
Makefile
adin.c
adin1100.c
air_en8811h.c
amd.c
as21xxx.c
ax88796b.c
ax88796b_rust.rs
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h
bcm-phy-ptp.c
bcm7xxx.c
bcm63xx.c
bcm87xx.c
bcm54140.c
bcm84881.c
broadcom.c
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83td510.c
dp83tg720.c
dp83640.c
dp83640_reg.h
dp83822.c
dp83848.c
dp83867.c
dp83869.c
et1011c.c
fixed_phy.c
icplus.c
intel-xway.c
linkmode.c
lxt.c
marvell-88q2xxx.c
marvell-88x2222.c
marvell.c
marvell10g.c
mdio-open-alliance.h
mdio-private.h
mdio_bus.c
mdio_bus_provider.c
mdio_device.c
mdio_devres.c
meson-gxl.c
micrel.c
microchip.c
microchip_rds_ptp.c
microchip_rds_ptp.h
microchip_t1.c
microchip_t1s.c
mii_timestamper.c
motorcomm.c
mxl-86110.c
mxl-gpy.c
national.c
ncn26000.c
nxp-c45-tja11xx-macsec.c
nxp-c45-tja11xx.c
nxp-c45-tja11xx.h
nxp-cbtx.c
nxp-tja11xx.c
open_alliance_helpers.c
open_alliance_helpers.h
phy-c45.c
phy-caps.h
phy-core.c
phy.c
phy_caps.c
phy_device.c
phy_led_triggers.c
phy_link_topology.c
phy_package.c
phylib-internal.h
phylib.h
phylink.c
qsemi.c
qt2025.rs
rockchip.c
sfp-bus.c
sfp.c
sfp.h
smsc.c
ste10Xp.c
stubs.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c