Skip to content
Commit e96b2933 authored by Csókás, Bence's avatar Csókás, Bence Committed by Jakub Kicinski
Browse files

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

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>
parent d30d0e49
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