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>
master
Heinrich Schuchardt 7 years ago committed by Alexander Graf
parent 2d5dc2a52d
commit abe994633b
  1. 2
      lib/efi_selftest/efi_selftest_events.c
  2. 2
      lib/efi_selftest/efi_selftest_tpl.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;
}

@ -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;
}

Loading…
Cancel
Save