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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250121-nuvoton-v1-3-1ea4f0cdbda2@chromium.org>
Date: Tue, 21 Jan 2025 21:14:52 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Joseph Liu <kwliu@...oton.com>, Marvin Lin <kflin@...oton.com>, 
 Mauro Carvalho Chehab <mchehab@...nel.org>, 
 Hans Verkuil <hverkuil@...all.nl>, Philipp Zabel <p.zabel@...gutronix.de>
Cc: Marvin Lin <milkfafa@...il.com>, linux-media@...r.kernel.org, 
 openbmc@...ts.ozlabs.org, linux-kernel@...r.kernel.org, 
 Ricardo Ribalda <ribalda@...omium.org>
Subject: [PATCH 3/4] media: nuvoton: Use cleanup.h macros for device_node

Instead of manually calling of_node_put, use the __free macros/helpers.

Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
 drivers/media/platform/nuvoton/npcm-video.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c
index f6cba17a7924..8e69fa14433a 100644
--- a/drivers/media/platform/nuvoton/npcm-video.c
+++ b/drivers/media/platform/nuvoton/npcm-video.c
@@ -1648,8 +1648,8 @@ static int npcm_video_setup_video(struct npcm_video *video)
 
 static int npcm_video_ece_init(struct npcm_video *video)
 {
+	struct device_node *ece_node __free(device_node) = NULL;
 	struct device *dev = video->dev;
-	struct device_node *ece_node;
 	struct platform_device *ece_pdev;
 	void __iomem *regs;
 
@@ -1665,7 +1665,6 @@ static int npcm_video_ece_init(struct npcm_video *video)
 		dev_info(dev, "Support HEXTILE pixel format\n");
 
 		ece_pdev = of_find_device_by_node(ece_node);
-		of_node_put(ece_node);
 		if (!ece_pdev) {
 			dev_err(dev, "Failed to find ECE device\n");
 			return -ENODEV;
@@ -1692,8 +1691,6 @@ static int npcm_video_ece_init(struct npcm_video *video)
 			dev_err(dev, "Failed to get ECE reset control in DTS\n");
 			return PTR_ERR(video->ece.reset);
 		}
-	} else {
-		of_node_put(ece_node);
 	}
 
 	return 0;

-- 
2.48.0.rc2.279.g1de40edade-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ