Skip to content

Commit 78b6a99

Browse files
krzkchanwoochoi
authored andcommitted
extcon: adc-jack: Fix wakeup source leaks on device unbind
Device can be unbound, so driver must also release memory for the wakeup source. Do not use devm interface, because it would change the order of cleanup. Link: https://lore.kernel.org/lkml/20250501-device-wakeup-leak-extcon-v2-1-7af77802cbea@linaro.org/ Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
1 parent 1b237f1 commit 78b6a99

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/extcon/extcon-adc-jack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ static void adc_jack_remove(struct platform_device *pdev)
164164
{
165165
struct adc_jack_data *data = platform_get_drvdata(pdev);
166166

167+
device_init_wakeup(&pdev->dev, false);
167168
free_irq(data->irq, data);
168169
cancel_work_sync(&data->handler.work);
169170
}

0 commit comments

Comments
 (0)