Skip to content

Commit de404fc

Browse files
rtc: mpfs: 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-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 27b2fcb commit de404fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-mpfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int mpfs_rtc_probe(struct platform_device *pdev)
266266
writel(prescaler, rtcdev->base + PRESCALER_REG);
267267
dev_info(&pdev->dev, "prescaler set to: %lu\n", prescaler);
268268

269-
device_init_wakeup(&pdev->dev, true);
269+
devm_device_init_wakeup(&pdev->dev);
270270
ret = devm_pm_set_wake_irq(&pdev->dev, wakeup_irq);
271271
if (ret)
272272
dev_err(&pdev->dev, "failed to enable irq wake\n");

0 commit comments

Comments
 (0)