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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251117-cleanup_node_put-v1-5-5f107071d171@oss.qualcomm.com>
Date: Mon, 17 Nov 2025 10:21:24 +0530
From: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
To: Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
Subject: [PATCH 05/10] soc: qcom: rpm_master_stats: Use __cleanup() for
 device_node pointers

Apply the __cleanup() attribute to device_node pointers to simplify
resource management and remove explicit of_node_put() calls.

Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
---
 drivers/soc/qcom/rpm_master_stats.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/qcom/rpm_master_stats.c b/drivers/soc/qcom/rpm_master_stats.c
index c7788337e1647da386e874bcb87313e8f07241df..06a1d3fe5e9b4295018b0e5cbcf738c0e9e83c3b 100644
--- a/drivers/soc/qcom/rpm_master_stats.c
+++ b/drivers/soc/qcom/rpm_master_stats.c
@@ -67,9 +67,9 @@ DEFINE_SHOW_ATTRIBUTE(master_stats);
 
 static int master_stats_probe(struct platform_device *pdev)
 {
+	struct device_node *msgram_np __free(device_node) = NULL;
 	struct device *dev = &pdev->dev;
 	struct master_stats_data *data;
-	struct device_node *msgram_np;
 	struct dentry *dent, *root;
 	struct resource res;
 	int count, i, ret;
@@ -98,7 +98,6 @@ static int master_stats_probe(struct platform_device *pdev)
 		 * shared resource.
 		 */
 		ret = of_address_to_resource(msgram_np, 0, &res);
-		of_node_put(msgram_np);
 		if (ret < 0) {
 			debugfs_remove_recursive(root);
 			return ret;

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ