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: <20250501081918.3621432-1-lee@kernel.org>
Date: Thu,  1 May 2025 09:19:11 +0100
From: Lee Jones <lee@...nel.org>
To: lee@...nel.org,
	Pavel Machek <pavel@...nel.org>,
	linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: bettyzhou@...gle.com,
	ynaffit@...gle.com,
	tkjos@...gle.com,
	jacek.anaszewski@...il.com
Subject: [PATCH 1/3] led: led-test: Remove standard error checking after KUNIT_ASSERT_*()

If a KUNIT_ASSERT_*() call ends up in an assertion, the test is marked
as a failure and the subsequent error checking is never executed, making
it superfluous.  Remove it for simplicity and to avoid confusion.

Signed-off-by: Lee Jones <lee@...nel.org>
---
 drivers/leds/led-test.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/leds/led-test.c b/drivers/leds/led-test.c
index 068c9d0eb683..23820189abe3 100644
--- a/drivers/leds/led-test.c
+++ b/drivers/leds/led-test.c
@@ -26,8 +26,6 @@ static void led_test_class_register(struct kunit *test)
 
 	ret = devm_led_classdev_register(dev, cdev);
 	KUNIT_ASSERT_EQ(test, ret, 0);
-	if (ret)
-		return;
 }
 
 static struct kunit_case led_test_cases[] = {
-- 
2.49.0.906.g1f30a19c02-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ