[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221116135500.GC3498904@roeck-us.net>
Date: Wed, 16 Nov 2022 05:55:00 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: ruanjinjie <ruanjinjie@...wei.com>
Cc: wim@...ux-watchdog.org, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com, claudiu.beznea@...rochip.com,
bbrezillon@...nel.org, linux-watchdog@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] watchdog: at91sam9_wdt: use devm_request_irq to avoid
missing free_irq() in error path
On Wed, Nov 16, 2022 at 05:49:50PM +0800, ruanjinjie wrote:
> 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@...wei.com>
Reviewed-by: Guenter Roeck <linux@...ck-us.net>
> ---
> drivers/watchdog/at91sam9_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> index 292b5a1ca831..b9e8572c707d 100644
> --- a/drivers/watchdog/at91sam9_wdt.c
> +++ b/drivers/watchdog/at91sam9_wdt.c
> @@ -206,7 +206,7 @@ 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,
> + err = devm_request_irq(dev, wdt->irq, wdt_interrupt,
> IRQF_SHARED | IRQF_IRQPOLL |
> IRQF_NO_SUSPEND,
> pdev->name, wdt);
> --
> 2.25.1
>
Powered by blists - more mailing lists