lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 15 Jun 2022 22:21:44 +0800
From:   Liang He <windhl@....com>
To:     gregkh@...uxfoundation.org, geert+renesas@...der.be
Cc:     linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        windhl@....com
Subject: [PATCH] drivers: staging: board: Add missing of_node_put() in board.c

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>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ