[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251117-cleanup_node_put-v1-4-5f107071d171@oss.qualcomm.com>
Date: Mon, 17 Nov 2025 10:21:23 +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 04/10] soc: qcom: rpm-proc: 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-proc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/qcom/rpm-proc.c b/drivers/soc/qcom/rpm-proc.c
index 2466d0400c2e9a539e0b1009ee1bfefc3bd1b589..6f0c9f2558b06323c1100caa4544872badc22599 100644
--- a/drivers/soc/qcom/rpm-proc.c
+++ b/drivers/soc/qcom/rpm-proc.c
@@ -9,15 +9,14 @@
static int rpm_proc_probe(struct platform_device *pdev)
{
+ struct device_node *edge_node __free(device_node) = NULL;
struct qcom_smd_edge *edge = NULL;
struct device *dev = &pdev->dev;
- struct device_node *edge_node;
int ret;
edge_node = of_get_child_by_name(dev->of_node, "smd-edge");
if (edge_node) {
edge = qcom_smd_register_edge(dev, edge_node);
- of_node_put(edge_node);
if (IS_ERR(edge))
return dev_err_probe(dev, PTR_ERR(edge),
"Failed to register smd-edge\n");
--
2.34.1
Powered by blists - more mailing lists