]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
extcon: qcom-spmi-misc: Fix wakeup source leaks on device unbind
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 1 May 2025 14:33:24 +0000 (16:33 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 26 Aug 2025 10:51:36 +0000 (19:51 +0900)
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>
drivers/extcon/extcon-qcom-spmi-misc.c

index 53de581a393a35bb48f637ea73e910b4c8340ace..afaba5685c3dcdbdc750c1835ec4c696bcc64fc4 100644 (file)
@@ -155,7 +155,7 @@ static int qcom_usb_extcon_probe(struct platform_device *pdev)
        }
 
        platform_set_drvdata(pdev, info);
-       device_init_wakeup(dev, 1);
+       devm_device_init_wakeup(dev);
 
        /* Perform initial detection */
        qcom_usb_extcon_detect_cable(&info->wq_detcable.work);