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>] [day] [month] [year] [list]
Message-ID: <b462b48a-eaf3-4324-86cf-ca45c1a74a69@web.de>
Date: Mon, 20 Oct 2025 14:38:08 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-media@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org, Alain Volmat
 <alain.volmat@...s.st.com>, Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Hans Verkuil <hverkuil@...all.nl>, Mauro Carvalho Chehab
 <mchehab@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Anand Moon <linux.amoon@...il.com>,
 Christophe Jaillet <christophe.jaillet@...adoo.fr>
Subject: [PATCH] media: stm32: csi: Omit two variable reassignments in
 stm32_csi_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 20 Oct 2025 14:30:06 +0200

An error code was assigned to a variable and checked accordingly.
This value was passed to a dev_err_probe() call in an if branch.
This function is documented in the way that the same value is returned.
Thus delete two redundant variable reassignments.

The source code was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/media/platform/st/stm32/stm32-csi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/st/stm32/stm32-csi.c b/drivers/media/platform/st/stm32/stm32-csi.c
index fd2b6dfbd44c..a997b34a73d7 100644
--- a/drivers/media/platform/st/stm32/stm32-csi.c
+++ b/drivers/media/platform/st/stm32/stm32-csi.c
@@ -1033,8 +1033,7 @@ static int stm32_csi_probe(struct platform_device *pdev)
 
 	ret = reset_control_assert(rstc);
 	if (ret) {
-		ret = dev_err_probe(&pdev->dev, ret,
-				    "Failed to assert the reset line\n");
+		dev_err_probe(&pdev->dev, ret, "Failed to assert the reset line\n");
 		goto err_cleanup;
 	}
 
@@ -1042,8 +1041,7 @@ static int stm32_csi_probe(struct platform_device *pdev)
 
 	ret = reset_control_deassert(rstc);
 	if (ret) {
-		ret = dev_err_probe(&pdev->dev, ret,
-				    "Failed to deassert the reset line\n");
+		dev_err_probe(&pdev->dev, ret, "Failed to deassert the reset line\n");
 		goto err_cleanup;
 	}
 
-- 
2.51.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ