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

mfd: as3722: Fix wakeup source leaks on device unbind

Device can be unbound, so driver must also release memory for the wakeup
source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-2-318e14bdba0a@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
2c8294c9 6d0b2398

+3 -1
+3 -1
drivers/mfd/as3722.c
··· 394 394 return ret; 395 395 } 396 396 397 - device_init_wakeup(as3722->dev, true); 397 + ret = devm_device_init_wakeup(as3722->dev); 398 + if (ret) 399 + return dev_err_probe(as3722->dev, ret, "Failed to init wakeup\n"); 398 400 399 401 dev_dbg(as3722->dev, "AS3722 core driver initialized successfully\n"); 400 402 return 0;