From: Alexandre Belloni Date: Mon, 3 Mar 2025 22:35:58 +0000 (+0100) Subject: rtc: pm8xxx: switch to devm_device_init_wakeup X-Git-Tag: v6.15-rc1~33^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eaa2998f8a2bbc1c120fe0e5d9da373b3084601;p=thirdparty%2Flinux.git rtc: pm8xxx: switch to devm_device_init_wakeup Switch to devm_device_init_wakeup to avoid a possible memory leak as wakeup is never disabled. Link: https://lore.kernel.org/r/20250303223600.1135142-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 3b9709214a08d..a88073efffb32 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -503,7 +503,7 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc_dd); - device_init_wakeup(&pdev->dev, true); + devm_device_init_wakeup(&pdev->dev); rtc_dd->rtc = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(rtc_dd->rtc))