Re: [PATCH] net: sfp: Always call `sfp_sm_mod_remove()` on remove

From: Andrew Lunn
Date: Thu Jun 06 2024 - 11:23:19 EST


On Wed, Jun 05, 2024 at 10:42:51AM +0200, Csókás, Bence wrote:
> 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.
>
> Signed-off-by: "Csókás, Bence" <csokas.bence@xxxxxxxxx>

I was expecting Russell to review this. Maybe he missed it.

This looks O.K. to me:

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew