The data parameters for request_irq and free_irq have to match, otherwise the
IRQ wont be freed.
The issue has been discovered using the following coccinelle patch:
// <smpl>
@r1@
type T;
T data;
@@
(
request_irq(..., (void *)data)
|
request_irq(..., data)
|
request_threaded_irq(..., (void *)data)
|
request_threaded_irq(..., data)
)
@r2@
type r1.T;
T data;
position p;
@@
(
free_irq@p(..., (void *)data)
|
free_irq@p(..., data)
)
@depends on r1@
position p != r2.p;
@@
*free_irq@p(...)
// </smpl>
Cc: Roland Stigge <stigge@antcom.de>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
return 0;
errout5:
- free_irq(irq, iodev);
+ free_irq(irq, info);
errout4:
clk_put(info->clk);
errout3:
int irq = platform_get_irq(pdev, 0);
iio_device_unregister(iodev);
- free_irq(irq, iodev);
+ free_irq(irq, info);
platform_set_drvdata(pdev, NULL);
clk_put(info->clk);
iounmap(info->adc_base);