Commit 9e3d71a9 authored by Rosen Penev's avatar Rosen Penev Committed by Jakub Kicinski
Browse files

net: thunder_bgx: decrement cleanup index before use



All paths in probe that call goto defer do so before assigning phydev
and thus it makes sense to cleanup the prior index. It also fixes a bug
where index 0 does not get cleaned up.

Fixes: b7d3e3d3 ("net: thunderx: Don't leak phy device references on -EPROBE_DEFER condition.")
Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
Reviewed-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250901213314.48599-1-rosenp@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9d28f949
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment