]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rtc: pm8xxx: switch to devm_device_init_wakeup
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 3 Mar 2025 22:35:58 +0000 (23:35 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 17 Mar 2025 10:51:49 +0000 (11:51 +0100)
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 <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pm8xxx.c

index 3b9709214a08d86273ee891ee75a9cd8e4518b33..a88073efffb322c27b30432c0d64b6265ca7fd5b 100644 (file)
@@ -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))