Re: [PATCH v2] hwmon: (npcm750-pwm-fan): stop fan timer on device detach

From: Guenter Roeck

Date: Wed Jul 29 2026 - 12:30:56 EST


On Wed, Jul 29, 2026 at 06:01:16PM +0800, Hongyan Xu wrote:
> When a fan tach channel is present, npcm7xx_pwm_fan_probe() starts
> fan_timer. The timer callback polls tach state and rearms the timer, but
> the driver has no remove callback or devm cleanup action to stop it. On
> device detach, the devm-managed driver data and I/O mappings can be
> released while the timer is still pending or running.
>
> Register a devm cleanup action before starting the timer and shut the
> timer down synchronously from that action.
>
> This issue was found by a static analysis tool.
>
> Fixes: f1fd4a4db777 ("hwmon: Add NPCM7xx PWM and Fan driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Hongyan Xu <getshell@xxxxxxxxxx>

Applied.

Thanks,
Guenter