Skip to content
Commit 84a0d868 authored by Csókás, Bence's avatar Csókás, Bence Committed by Greg Kroah-Hartman
Browse files

net: sfp: Always call `sfp_sm_mod_remove()` on remove

[ Upstream commit e96b2933 ]

If the module is in SFP_MOD_ERROR, `sfp_sm_mod_remove()` will
not be run. As a consequence, `sfp_hwmon_remove()` is not getting
run either, leaving a stale `hwmon` device behind. `sfp_sm_mod_remove()`
itself checks `sfp->sm_mod_state` anyways, so this check was not
really needed in the first place.

Fixes: d2e816c0

 ("net: sfp: handle module remove outside state machine")
Signed-off-by: default avatar"Csókás, Bence" <csokas.bence@prolan.hu>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240605084251.63502-1-csokas.bence@prolan.hu
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2b7be0eb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment