diff options
| author | Miaoqian Lin <linmq006@gmail.com> | 2025-12-11 12:13:13 +0400 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-12-22 12:18:54 +0100 |
| commit | 1e5a541420b8c6d87d88eb50b6b978cdeafee1c9 (patch) | |
| tree | 3906838f73f74b4beb331d9a50b0823c7cc37855 /scripts/basic/git@git.tavy.me:linux.git | |
| parent | 15ef641a0c6728d25a400df73922e80ab2cf029c (diff) | |
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: 98c485eaf509 ("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>
Diffstat (limited to 'scripts/basic/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
