lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] irqchip: nvic: release nvic_base upon failure
On Fri, Feb 18, 2022 at 10:03 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> From: "Souptick Joarder (HPE)" <jrdr.linux@gmail.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@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@gmail.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
>

\
 
 \ /
  Last update: 2022-03-01 04:14    [W:0.162 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site