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

From: Sanjay Chitroda

Date: Tue Apr 14 2026 - 11:27:00 EST




On 12 April 2026 12:01:24 am IST, David Lechner <dlechner@xxxxxxxxxxxx> wrote:
>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.
>

Hi David,

Thank you for your input.

I have created a change to drop duplicated wdt timer and work cleanup. Will send changes in next series in few days.