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]
Message-ID: <20251126065242.12186-1-dharanitharan725@gmail.com>
Date: Wed, 26 Nov 2025 06:52:42 +0000
From: Dharanitharan R <dharanitharan725@...il.com>
To: thierry.reding@...il.com
Cc: jonathanh@...dia.com,
	skomatineni@...dia.com,
	luca.ceresoli@...tlin.com,
	mchehab@...nel.org,
	gregkh@...uxfoundation.org,
	linux-media@...r.kernel.org,
	linux-tegra@...r.kernel.org,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Dharanitharan R <dharanitharan725@...il.com>
Subject: [PATCH v1] media: tegra: vi: replace devm_kzalloc with kzalloc in probe

Replace devm_kzalloc() (line 1881) with kzalloc() in tegra_vi_probe()
since memory must be freed manually in error paths. Freed via kfree() in
rpm_disable, as recommended in the file comment (line 1204).

Signed-off-by: Dharanitharan R <dharanitharan725@...il.com>
---
 drivers/staging/media/tegra-video/vi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c
index c9276ff76157..73127ea6ee49 100644
--- a/drivers/staging/media/tegra-video/vi.c
+++ b/drivers/staging/media/tegra-video/vi.c
@@ -1878,7 +1878,7 @@ static int tegra_vi_probe(struct platform_device *pdev)
 	struct tegra_vi *vi;
 	int ret;
 
-	vi = devm_kzalloc(&pdev->dev, sizeof(*vi), GFP_KERNEL);
+	vi = kzalloc(sizeof(*vi), GFP_KERNEL);
 	if (!vi)
 		return -ENOMEM;
 
@@ -1941,6 +1941,7 @@ static int tegra_vi_probe(struct platform_device *pdev)
 	if (vi->ops->vi_enable)
 		vi->ops->vi_enable(vi, false);
 	pm_runtime_disable(&pdev->dev);
+	kfree(vi);
 	return ret;
 }
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ