From: Liang He <windhl@126.com>
To: gregkh@linuxfoundation.org, geert+renesas@glider.be
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
windhl@126.com
Subject: [PATCH] drivers: staging: board: Add missing of_node_put() in board.c
Date: Wed, 15 Jun 2022 22:21:44 +0800 [thread overview]
Message-ID: <20220615142144.3968617-1-windhl@126.com> (raw)
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>
---
drivers/staging/board/board.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
index f980af037345..408448c202a2 100644
--- 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;
}
--
2.25.1
next reply other threads:[~2022-06-15 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 14:21 Liang He [this message]
2022-06-15 14:26 ` Geert Uytterhoeven
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=20220615142144.3968617-1-windhl@126.com \
--to=windhl@126.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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®