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

Sanjay Chitroda
2026-04-14T15:25:11Z

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