extcon: adc-jack: cancel delayed work on remove
PATCH 1/1 extcon: adc-jack: cancel delayed work on remove
The IRQ handler queues handler as delayed work. The remove callback passes its embedded work_struct to cancel_work_sync(), which cannot cancel a pending delayed-work timer.
Free the IRQ to stop new queueing, then cancel the delayed work itself before devres releases the containing object.
Signed-off-by Hongyan Xu <[email protected]>
--- drivers/extcon/extcon-adc-jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-adc-jack.c +1 -1
@@ -163,7 +163,7 @@ static int adc_jack_remove(struct platform_device *pdev)struct adc_jack_data *data =platform_get_drvdata (pdev);free_irq (data->irq, data); -cancel_work_sync (&data->handler.work); +cancel_delayed_work_sync (&data->handler);return 0 ; }
Signature · 1 line
2.50.1.windows.1