+// SPDX-License-Identifier: GPL-2.0+
/*
* efi_selftest_events
*
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* This unit test uses timer events to check the implementation
* of the following boottime services:
* CreateEvent, CloseEvent, WaitForEvent, CheckEvent, SetTimer.
static struct efi_boot_services *boottime;
/*
- * Notification function, increments the notfication count if parameter
+ * Notification function, increments the notification count if parameter
* context is provided.
*
* @event notified event
return EFI_ST_FAILURE;
}
ret = boottime->set_timer(event_notify, EFI_TIMER_STOP, 0);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not cancel timer\n");
return EFI_ST_FAILURE;
}
/* Set 10 ms timer */
timer_ticks = 0;
ret = boottime->set_timer(event_notify, EFI_TIMER_RELATIVE, 100000);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not set timer\n");
return EFI_ST_FAILURE;
}
/* Set 100 ms timer */
ret = boottime->set_timer(event_wait, EFI_TIMER_PERIODIC, 1000000);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not set timer\n");
return EFI_ST_FAILURE;
}