[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFqt6zb4v9T0VP+PUB1bbK+xmr3qi0JyOXeO7VyF3wBko-eM_A@mail.gmail.com>
Date: Tue, 1 Mar 2022 08:43:32 +0530
From: Souptick Joarder <jrdr.linux@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>, maz@...nel.org
Cc: linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] irqchip: nvic: release nvic_base upon failure
On Fri, Feb 18, 2022 at 10:03 PM Souptick Joarder <jrdr.linux@...il.com> wrote:
>
> From: "Souptick Joarder (HPE)" <jrdr.linux@...il.com>
>
> smatch warning was reported as below ->
>
> smatch warnings:
> drivers/irqchip/irq-nvic.c:131 nvic_of_init()
> warn: 'nvic_base' not released on lines: 97.
>
> Release nvic_base upon failure.
Any comments on this patch ?
>
> Reported-by: kernel test robot <lkp@...el.com>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@...il.com>
> ---
> drivers/irqchip/irq-nvic.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c
> index 125f9c1cf0c3..ba6332b00a0a 100644
> --- a/drivers/irqchip/irq-nvic.c
> +++ b/drivers/irqchip/irq-nvic.c
> @@ -94,6 +94,7 @@ static int __init nvic_of_init(struct device_node *node,
>
> if (!nvic_irq_domain) {
> pr_warn("Failed to allocate irq domain\n");
> + iounmap(nvic_base);
> return -ENOMEM;
> }
>
> @@ -103,6 +104,7 @@ static int __init nvic_of_init(struct device_node *node,
> if (ret) {
> pr_warn("Failed to allocate irq chips\n");
> irq_domain_remove(nvic_irq_domain);
> + iounmap(nvic_base);
> return ret;
> }
>
> --
> 2.25.1
>
Powered by blists - more mailing lists