lkml.org 
[lkml]   [2013]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/2] iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
On 07/15/2013 01:09 PM, Kozaruk, Oleksandr wrote:
[...]
>
>>> + ret = devm_request_threaded_irq(dev, irq, NULL,
>>> + twl6030_gpadc_irq_handler,
>>> + IRQF_ONESHOT, "twl6030_gpadc", gpadc);
>>
>> You access memory in the interrupt handler which is freed before the interrupt
>> handler is freed.
> Thanks for pointing this. devm_* will free memory for irq after the driver
> is removed and memory for the device is freed. I took me awhile to understand
> this. Is there going to be something like devm_iio_device_alloc? whould it be helpfull?
>

Yes, I think it certainly makes sense to add a devm_iio_device_alloc(), care
to send a patch?


\
 
 \ /
  Last update: 2013-07-15 14:21    [W:0.031 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site