diff mbox series

[1/4] extcon: adc-jack: Fix wakeup source leaks on device unbind

Message ID 20250406-device-wakeup-leak-extcon-v1-1-8873eca57465@linaro.org
State New
Headers show
Series extcon: Fix wakeup source leaks on device unbind | expand

Commit Message

Krzysztof Kozlowski April 6, 2025, 8:16 p.m. UTC
Device can be unbound, so driver must also release memory for the wakeup
source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/extcon/extcon-adc-jack.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
index 46c40d85c2ac89599ffbe7b6d11b161b295d5564..d7e4b1418d7e6b242780b3511f2a49def3acb7a6 100644
--- a/drivers/extcon/extcon-adc-jack.c
+++ b/drivers/extcon/extcon-adc-jack.c
@@ -164,6 +164,7 @@  static void adc_jack_remove(struct platform_device *pdev)
 {
 	struct adc_jack_data *data = platform_get_drvdata(pdev);
 
+	device_init_wakeup(&pdev->dev, 0);
 	free_irq(data->irq, data);
 	cancel_work_sync(&data->handler.work);
 }