mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] soc: tegra: fuse: Add missing of_node_put in tegra_init_fuse
@ 2022-06-16  1:46 Liang He
  0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-16  1:46 UTC (permalink / raw)
  To: thierry.reding, jonathanh, p.zabel, digetx, ndesaulniers,
	ulf.hansson, skamble, nathan, kkartik
  Cc: linux-tegra, linux-kernel, windhl

In this function, of_find_matching_node() will return a node
pointer with refcount incremented. We should use of_node_put
when the pointer *np* is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
---
 changelog:

 v2: use real name for Sob
 v1: fix the bug


 drivers/soc/tegra/fuse/fuse-tegra.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index b0a8405dbdb1..6542267a224d 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -568,6 +568,7 @@ static int __init tegra_init_fuse(void)
 	np = of_find_matching_node(NULL, car_match);
 	if (np) {
 		void __iomem *base = of_iomap(np, 0);
+		of_node_put(np);
 		if (base) {
 			tegra_enable_fuse_clk(base);
 			iounmap(base);
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-16  1:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16  1:46 [PATCH v2] soc: tegra: fuse: Add missing of_node_put in tegra_init_fuse Liang He

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®