Message ID | 20250406202245.53854-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/2] gpio: mpc8xxx: Fix wakeup source leaks on device unbind | expand |
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> On Sun, 06 Apr 2025 22:22:44 +0200, Krzysztof Kozlowski wrote: > Device can be unbound, so driver must also release memory for the wakeup > source. > > Applied, thanks! [1/2] gpio: mpc8xxx: Fix wakeup source leaks on device unbind https://git.kernel.org/brgl/linux/c/da47605e43af9996eb46c8a060f259a8c34cc3c5 [2/2] gpio: zynq: Fix wakeup source leaks on device unbind https://git.kernel.org/brgl/linux/c/c5672e310ad971d408752fce7596ed27adc6008f Best regards,
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 0cd4c36ae8aa..541517536489 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -410,7 +410,9 @@ static int mpc8xxx_probe(struct platform_device *pdev) goto err; } - device_init_wakeup(dev, true); + ret = devm_device_init_wakeup(dev); + if (ret) + return dev_err_probe(dev, ret, "Failed to init wakeup\n"); return 0; err:
Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/gpio/gpio-mpc8xxx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)