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

mfd: max77705: 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-5-318e14bdba0a@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
a59a56cc 6c7115cd

+3 -1
+3 -1
drivers/mfd/max77705.c
··· 131 131 if (ret) 132 132 return dev_err_probe(dev, ret, "Failed to register child devices\n"); 133 133 134 - device_init_wakeup(dev, true); 134 + ret = devm_device_init_wakeup(dev); 135 + if (ret) 136 + return dev_err_probe(dev, ret, "Failed to init wakeup\n"); 135 137 136 138 return 0; 137 139 }