Re: [PATCH v5 4/5] iio: ssp_sensors: use devm APIs for mutex and IRQ resources

David Lechner
2026-04-11T18:31:29Z

On 4/11/26 6:35 AM, Sanjay Chitroda wrote:
>
>
> Also, I observed that in remove() path, there is duplicate of following with ssp_disable_wdt_timer():
>
> static void ssp_remove(struct spi_device *spi)
> {
> ...
> ssp_disable_wdt_timer(data);
>
> ....
>
> timer_delete_sync(&data->wdt_timer);
> cancel_work_sync(&data->work_wdt);
>
> ...
> }
>
> static void ssp_disable_wdt_timer(data)(struct spi_device *spi)
> {
> timer_delete_sync(&data->wdt_timer);
> cancel_work_sync(&data->work_wdt);
> }
>
> At first glance looks redundant, do we require both ?

No, this sounds like a double-free bug.