Commit 1d7f2548 authored by Lee Jones's avatar Lee Jones
Browse files

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: default avatarLee Jones <lee@kernel.org>
parent b441b95a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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[] = {