summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-10-12 23:00:05 (GMT)
committerAlexander Graf <agraf@suse.de>2017-10-13 08:24:22 (GMT)
commitabe994633b2ad56c5eea87c9253873f41dab477d (patch)
tree6ae531c2c3e7d20f6f6041e0548cdd8b77df96b7 /lib
parent2d5dc2a52d412964031c9920d354ad5bdc91c654 (diff)
downloadu-boot-abe994633b2ad56c5eea87c9253873f41dab477d.tar.xz
efi_selftest: correctly check return values
When cancelling the timer we should check the return value provided by the set_timer service. 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.c2
-rw-r--r--lib/efi_selftest/efi_selftest_tpl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_selftest/efi_selftest_events.c b/lib/efi_selftest/efi_selftest_events.c
index b2cdc15..081f312 100644
--- a/lib/efi_selftest/efi_selftest_events.c
+++ b/lib/efi_selftest/efi_selftest_events.c
@@ -186,7 +186,7 @@ static int execute(void)
return EFI_ST_FAILURE;
}
ret = boottime->set_timer(event_wait, EFI_TIMER_STOP, 0);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not cancel timer\n");
return EFI_ST_FAILURE;
}
diff --git a/lib/efi_selftest/efi_selftest_tpl.c b/lib/efi_selftest/efi_selftest_tpl.c
index b8c0e70..ddb67ed 100644
--- a/lib/efi_selftest/efi_selftest_tpl.c
+++ b/lib/efi_selftest/efi_selftest_tpl.c
@@ -207,7 +207,7 @@ static int execute(void)
return EFI_ST_FAILURE;
}
ret = boottime->set_timer(event_wait, EFI_TIMER_STOP, 0);
- if (index != 0) {
+ if (ret != EFI_SUCCESS) {
efi_st_error("Could not cancel timer\n");
return EFI_ST_FAILURE;
}