]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: ssp_sensors: cancel delayed work_refresh on remove
authorSanjay Chitroda <sanjayembeddedse@gmail.com>
Sun, 26 Apr 2026 09:17:04 +0000 (14:47 +0530)
committerJonathan Cameron <jic23@kernel.org>
Fri, 15 May 2026 11:05:34 +0000 (12:05 +0100)
The work_refresh may still be pending or running when the device is
removed, cancel the delayed work_refresh in remove path.

Fixes: 50dd64d57eee ("iio: common: ssp_sensors: Add sensorhub driver")
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/ssp_sensors/ssp_dev.c

index da09c9f3ceb6c8eae8e435447e6eb5d8ce4fa69f..e2538a84c812910ddc1f5130fc4304e36662bdf8 100644 (file)
@@ -590,6 +590,7 @@ static void ssp_remove(struct spi_device *spi)
        ssp_clean_pending_list(data);
 
        free_irq(data->spi->irq, data);
+       cancel_delayed_work_sync(&data->work_refresh);
 
        timer_delete_sync(&data->wdt_timer);
        cancel_work_sync(&data->work_wdt);