summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-01-06 16:44:16 +0100
committerAlexander Graf <agraf@suse.de>2019-02-13 09:40:05 +0100
commit44e7c62a826b8df34ea5f1f040cceb2455559295 (patch)
treed6d76a69ae6a61a14c73f47b5e2ae677b69eccfb
parent1309a159ceb6c423db53f79cb4c5b8a69dc47f36 (diff)
efi_selftest: tpl 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>
-rw-r--r--lib/efi_selftest/efi_selftest_tpl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_selftest/efi_selftest_tpl.c b/lib/efi_selftest/efi_selftest_tpl.c
index 97d256abe4..70a355eae6 100644
--- a/lib/efi_selftest/efi_selftest_tpl.c
+++ b/lib/efi_selftest/efi_selftest_tpl.c
@@ -151,7 +151,7 @@ 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;
}
@@ -164,7 +164,7 @@ static int execute(void)
/* Set 10 ms timer */
notification_count = 0;
ret = boottime->set_timer(event_notify, EFI_TIMER_PERIODIC, 100000);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not set timer\n");
return EFI_ST_FAILURE;
}