From: Krzysztof Kozlowski Date: Thu, 1 May 2025 14:33:23 +0000 (+0200) Subject: extcon: fsa9480: Fix wakeup source leaks on device unbind X-Git-Tag: v6.18-rc1~74^2~13^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f982d55f8c5d1e9189906a2a352dba8de421f5f;p=thirdparty%2Fkernel%2Flinux.git extcon: fsa9480: 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-3-7af77802cbea@linaro.org/ Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-fsa9480.c b/drivers/extcon/extcon-fsa9480.c index b11b43171063..a031eb0914a0 100644 --- a/drivers/extcon/extcon-fsa9480.c +++ b/drivers/extcon/extcon-fsa9480.c @@ -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;