From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Liang He <windhl@126.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers: staging: board: Add missing of_node_put() in board.c
Date: Wed, 15 Jun 2022 16:26:26 +0200 [thread overview]
Message-ID: <CAMuHMdX4O2d6BFnsW58r_uQezRnpQ9EERFyVt2RC6mbfxZEHSg@mail.gmail.com> (raw)
In-Reply-To: <20220615142144.3968617-1-windhl@126.com>
Hi Liang,
On Wed, Jun 15, 2022 at 4:21 PM Liang He <windhl@126.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@126.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@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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
prev parent reply other threads:[~2022-06-15 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 14:21 Liang He
2022-06-15 14:26 ` Geert Uytterhoeven [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMuHMdX4O2d6BFnsW58r_uQezRnpQ9EERFyVt2RC6mbfxZEHSg@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=windhl@126.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®