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

extcon: qcom-spmi-misc: 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-4-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
369259d5 6f982d55

+1 -1
+1 -1
drivers/extcon/extcon-qcom-spmi-misc.c
··· 155 155 } 156 156 157 157 platform_set_drvdata(pdev, info); 158 - device_init_wakeup(dev, 1); 158 + devm_device_init_wakeup(dev); 159 159 160 160 /* Perform initial detection */ 161 161 qcom_usb_extcon_detect_cable(&info->wq_detcable.work);