From: Krzysztof Kozlowski Date: Sun, 6 Apr 2025 20:35:30 +0000 (+0200) Subject: watchdog: stm32: Fix wakeup source leaks on device unbind X-Git-Tag: v6.16-rc1~86^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6f8a417e17f1929bb8e7e6ba9f4677f1f3ce364;p=thirdparty%2Flinux.git watchdog: stm32: Fix wakeup source leaks on device unbind Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20250406203531.61322-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c index 8ad06b54c5adc..b356a272ff9a0 100644 --- a/drivers/watchdog/stm32_iwdg.c +++ b/drivers/watchdog/stm32_iwdg.c @@ -291,7 +291,7 @@ static int stm32_iwdg_irq_init(struct platform_device *pdev, return 0; if (of_property_read_bool(np, "wakeup-source")) { - ret = device_init_wakeup(dev, true); + ret = devm_device_init_wakeup(dev); if (ret) return ret;