]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
extcon: axp288: Fix wakeup source leaks on device unbind
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 1 May 2025 14:33:22 +0000 (16:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:06 +0000 (15:37 -0500)
[ Upstream commit 93ccf3f2f22ceaa975b462156f98527febee4fe5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/extcon/extcon-axp288.c

index d3bcbe839c095f126f0313a074681f1c900762c2..19856dddade62c5592701f8fd5842857ec24813a 100644 (file)
@@ -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;