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

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

authored by

Krzysztof Kozlowski and committed by
Lee Jones
fd37695d a59a56cc

+1
+1
drivers/mfd/max8925-i2c.c
··· 201 201 struct max8925_chip *chip = i2c_get_clientdata(client); 202 202 203 203 max8925_device_exit(chip); 204 + device_init_wakeup(&client->dev, false); 204 205 i2c_unregister_device(chip->adc); 205 206 i2c_unregister_device(chip->rtc); 206 207 }