From: Krzysztof Kozlowski Date: Thu, 1 May 2025 14:33:22 +0000 (+0200) Subject: extcon: axp288: Fix wakeup source leaks on device unbind X-Git-Tag: v6.18-rc1~74^2~13^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93ccf3f2f22ceaa975b462156f98527febee4fe5;p=thirdparty%2Fkernel%2Flinux.git extcon: axp288: Fix wakeup source leaks on device unbind Device can be unbound, so driver must also release memory for the wakeup source. Link: https://lore.kernel.org/lkml/20250501-device-wakeup-leak-extcon-v2-2-7af77802cbea@linaro.org/ Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index d3bcbe839c09..19856dddade6 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c @@ -470,7 +470,7 @@ static int axp288_extcon_probe(struct platform_device *pdev) if (ret < 0) return ret; - device_init_wakeup(dev, true); + devm_device_init_wakeup(dev); platform_set_drvdata(pdev, info); return 0;