diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-01-06 18:38:57 +0300 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2019-02-13 11:40:05 +0300 |
commit | 1309a159ceb6c423db53f79cb4c5b8a69dc47f36 (patch) | |
tree | dfd9045e1370e24bc6ed4a4fdb4959140f454f99 /lib | |
parent | 8a42641a3e1c24709ad36d34119c59d19dd2a0eb (diff) | |
download | u-boot-1309a159ceb6c423db53f79cb4c5b8a69dc47f36.tar.xz |
efi_selftest: events unit test, check return values
For some API calls checks for the return values are missing.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_selftest/efi_selftest_events.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/efi_selftest/efi_selftest_events.c b/lib/efi_selftest/efi_selftest_events.c index ed99a53804..1077cbdf9e 100644 --- a/lib/efi_selftest/efi_selftest_events.c +++ b/lib/efi_selftest/efi_selftest_events.c @@ -147,20 +147,20 @@ static int execute(void) 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; } |