[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdX4O2d6BFnsW58r_uQezRnpQ9EERFyVt2RC6mbfxZEHSg@mail.gmail.com>
Date: Wed, 15 Jun 2022 16:26:26 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Liang He <windhl@....com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers: staging: board: Add missing of_node_put() in board.c
Hi Liang,
On Wed, Jun 15, 2022 at 4:21 PM Liang He <windhl@....com> wrote:
> In board_staging_gic_setup_xlate(), of_find_compatible_node() return
> a node pointer with refcount incremented. We should use of_node_put()
> when it is not used anymore.
>
> Signed-off-by: Liang He <windhl@....com>
Thanks for your patch!
> --- a/drivers/staging/board/board.c
> +++ b/drivers/staging/board/board.c
> @@ -67,6 +67,8 @@ int __init board_staging_gic_setup_xlate(const char *gic_match,
> if (!irqc_node)
> return -ENOENT;
>
> + of_node_put(irqc_node);
> +
> irqc_base = base;
> return 0;
> }
irqc_node is a global variable, and it is used after this function
has returned.
NAKed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists