]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_selftest: correctly check return values
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 12 Oct 2017 23:00:05 +0000 (01:00 +0200)
committerAlexander Graf <agraf@suse.de>
Fri, 13 Oct 2017 08:24:22 +0000 (10:24 +0200)
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>
lib/efi_selftest/efi_selftest_events.c
lib/efi_selftest/efi_selftest_tpl.c

index b2cdc150da256e84d85920f31149c3de08e1701e..081f31257fbd60f66f1eff515fdeacdd39b7ffd9 100644 (file)
@@ -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;
        }
index b8c0e70262dbe196068f688a53052b84f952e21b..ddb67ed268ba4af25f8a789d319740f46230690d 100644 (file)
@@ -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;
        }