dm: pci: change bus number register setting compliant with Linux
[oweals/u-boot.git] / lib / efi_selftest / efi_selftest_tpl.c
index 0b78ee759568b7e90b5a32ce449dc412d88b76eb..ddb67ed268ba4af25f8a789d319740f46230690d 100644 (file)
@@ -26,7 +26,8 @@ static void EFIAPI notify(struct efi_event *event, void *context)
 {
        unsigned int *count = context;
 
-       ++*count;
+       if (count)
+               ++*count;
 }
 
 /*
@@ -206,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;
        }