rtc: mxc_v2: fix wake IRQ leak on probe failure and remove()
Subsystems (2)
PATCH 1/1 rtc: mxc_v2: fix wake IRQ leak on probe failure and remove()
dev_pm_set_wake_irq() in probe has no matching dev_pm_clear_wake_irq() anywhere -- not on later probe-failure paths, not in remove(). Switch to devm_pm_set_wake_irq(), which registers the clear automatically on every exit path.
--- drivers/rtc/rtc-mxc_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-mxc_v2.c +1 -1
@@ -302,7 +302,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)return pdata->irq;device_init_wakeup (&pdev->dev, true); - ret =dev_pm_set_wake_irq (&pdev->dev, pdata->irq); + ret =devm_pm_set_wake_irq (&pdev->dev, pdata->irq);if (ret)dev_err (&pdev->dev,"failed to enable irq wake\n" );
Signature · 1 line
2.25.1
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 10 lines
dev_pm_set_wake_irq()in probe has no matchingdev_pm_clear_wake_irq()anywhere -- not on later probe-failure paths, not inremove(). Switch todevm_pm_set_wake_irq(), which registers the clear automatically on every exit path.Fixes fbc5ee9a6955 ("rtc: mxc_v2: use dev_pm_set_wake_irq() to simplify code")Reported-by Sashiko AI review <[email protected]>Assisted-by LLMSigned-off-by Cong Nguyen <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 7 lines · Cong Nguyen
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
dev_pm_set_wake_irq()in probe has no matchingdev_pm_clear_wake_irq()anywhere -- not on later probe-failure paths, not inremove(). Switch todevm_pm_set_wake_irq(), which registers the clear automatically on every exit path.
Quoted 6 lines
Fixes fbc5ee9a6955 ("rtc: mxc_v2: use dev_pm_set_wake_irq() to simplify code")Reported-by Sashiko AI review <[email protected]>Assisted-by LLMSigned-off-by Cong Nguyen <[email protected]>---
Quoted 20 lines
drivers/rtc/rtc-mxc_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/rtc/rtc-mxc_v2.c +1
-2@@ -302,7 +302,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)return pdata->irq;device_init_wakeup (&pdev->dev, true); - ret =dev_pm_set_wake_irq (&pdev->dev, pdata->irq); + ret =devm_pm_set_wake_irq (&pdev->dev, pdata->irq);if (ret)dev_err (&pdev->dev,"failed to enable irq wake\n" ); --2.25.1