Patch "watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     watchdog-at91sam9_wdt-use-devm_request_irq-to-avoid-.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c95fdada68c82717687ec2d45f775f3a0919a2b2
Author: ruanjinjie <ruanjinjie@xxxxxxxxxx>
Date:   Wed Nov 16 17:49:50 2022 +0800

    watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path
    
    [ Upstream commit 07bec0e09c1afbab4c5674fd2341f4f52d594f30 ]
    
    free_irq() is missing in case of error in at91_wdt_init(), use
    devm_request_irq to fix that.
    
    Fixes: 5161b31dc39a ("watchdog: at91sam9_wdt: better watchdog support")
    Signed-off-by: ruanjinjie <ruanjinjie@xxxxxxxxxx>
    Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221116094950.3141943-1-ruanjinjie@xxxxxxxxxx
    [groeck: Adjust multi-line alignment]
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index f4050a229eb58..aaa3c5a8c4570 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -206,10 +206,9 @@ static int at91_wdt_init(struct platform_device *pdev, struct at91wdt *wdt)
 			 "min heartbeat and max heartbeat might be too close for the system to handle it correctly\n");
 
 	if ((tmp & AT91_WDT_WDFIEN) && wdt->irq) {
-		err = request_irq(wdt->irq, wdt_interrupt,
-				  IRQF_SHARED | IRQF_IRQPOLL |
-				  IRQF_NO_SUSPEND,
-				  pdev->name, wdt);
+		err = devm_request_irq(dev, wdt->irq, wdt_interrupt,
+				       IRQF_SHARED | IRQF_IRQPOLL | IRQF_NO_SUSPEND,
+				       pdev->name, wdt);
 		if (err)
 			return err;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux