Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Krzysztof Kozlowski and committed by
Chanwoo Choi
93ccf3f2 78b6a991

+1 -1
+1 -1
drivers/extcon/extcon-axp288.c
··· 470 470 if (ret < 0) 471 471 return ret; 472 472 473 - device_init_wakeup(dev, true); 473 + devm_device_init_wakeup(dev); 474 474 platform_set_drvdata(pdev, info); 475 475 476 476 return 0;