[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251117-cleanup_node_put-v1-1-5f107071d171@oss.qualcomm.com>
Date: Mon, 17 Nov 2025 10:21:20 +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 01/10] soc: qcom: aoss: Use __cleanup() for device_node
pointers
Make use of the __cleanup() attribute for 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/qcom_aoss.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c
index a543ab9bee6c4efcbd7026c44af9731176d4d60c..cc9882009bcac7eae8db74815563cdf1cd9a5aa6 100644
--- a/drivers/soc/qcom/qcom_aoss.c
+++ b/drivers/soc/qcom/qcom_aoss.c
@@ -447,8 +447,8 @@ static void qmp_cooling_devices_remove(struct qmp *qmp)
*/
struct qmp *qmp_get(struct device *dev)
{
+ struct device_node *np __free(device_node) = NULL;
struct platform_device *pdev;
- struct device_node *np;
struct qmp *qmp;
if (!dev || !dev->of_node)
@@ -459,7 +459,6 @@ struct qmp *qmp_get(struct device *dev)
return ERR_PTR(-ENODEV);
pdev = of_find_device_by_node(np);
- of_node_put(np);
if (!pdev)
return ERR_PTR(-EINVAL);
--
2.34.1
Powered by blists - more mailing lists