]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
extcon: fsa9480: Fix wakeup source leaks on device unbind
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 1 May 2025 14:33:23 +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-3-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-fsa9480.c

index b11b43171063d6dc14a5a4a7efb63e610397312c..a031eb0914a0b68aacb0f5f1f522597ea286fa2b 100644 (file)
@@ -317,7 +317,7 @@ static int fsa9480_probe(struct i2c_client *client)
                return ret;
        }
 
-       device_init_wakeup(info->dev, true);
+       devm_device_init_wakeup(info->dev);
        fsa9480_detect_dev(info);
 
        return 0;