From: Lee Jones Date: Thu, 1 May 2025 08:19:11 +0000 (+0100) Subject: leds: led-test: Remove standard error checking after KUNIT_ASSERT_*() X-Git-Tag: v6.16-rc1~62^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d7f25483c8791f395dd857cce8a6a65bcfa295f;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/drivers/leds/led-test.c b/drivers/leds/led-test.c index 068c9d0eb6838..23820189abe39 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[] = {