Skip to content

Commit 1d7f254

Browse files
committed
leds: 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. Link: https://lore.kernel.org/r/20250501081918.3621432-1-lee@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent b441b95 commit 1d7f254

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/leds/led-test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ static void led_test_class_register(struct kunit *test)
2626

2727
ret = devm_led_classdev_register(dev, cdev);
2828
KUNIT_ASSERT_EQ(test, ret, 0);
29-
if (ret)
30-
return;
3129
}
3230

3331
static struct kunit_case led_test_cases[] = {

0 commit comments

Comments
 (0)