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/[email protected]/ Acked-by: MyungJoo Ham <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 1b237f1 commit 78b6a99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)