From 4e996a838c65a4cd319c32a62e1ff67c02ca969b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 12 Jul 2019 12:55:32 +0200 Subject: [PATCH] efi_selftest: do not call CloseEvent() after ExitBootServices() Boot services are not available after calling ExitBootServices(). So we should not try to close an event here. Signed-off-by: Heinrich Schuchardt Reviewed-by: Oleksandr Suvorov --- .../efi_selftest_exitbootservices.c | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/lib/efi_selftest/efi_selftest_exitbootservices.c b/lib/efi_selftest/efi_selftest_exitbootservices.c index f1a136044d..4fecd1b415 100644 --- a/lib/efi_selftest/efi_selftest_exitbootservices.c +++ b/lib/efi_selftest/efi_selftest_exitbootservices.c @@ -55,28 +55,6 @@ static int setup(const efi_handle_t handle, return EFI_ST_SUCCESS; } -/* - * Tear down unit test. - * - * Close the event created in setup. - * - * @return: EFI_ST_SUCCESS for success - */ -static int teardown(void) -{ - efi_status_t ret; - - if (event_notify) { - ret = boottime->close_event(event_notify); - event_notify = NULL; - if (ret != EFI_SUCCESS) { - efi_st_error("could not close event\n"); - return EFI_ST_FAILURE; - } - } - return EFI_ST_SUCCESS; -} - /* * Execute unit test. * @@ -107,5 +85,4 @@ EFI_UNIT_TEST(exitbootservices) = { .phase = EFI_SETUP_BEFORE_BOOTTIME_EXIT, .setup = setup, .execute = execute, - .teardown = teardown, }; -- 2.39.5