uefi: Check the error code of QueryCapsuleCapabilities() correctly

We can't print max or reset as they are undefined in the event of failure.
This commit is contained in:
Richard Hughes 2019-03-15 09:27:55 +00:00
parent fda89fd15e
commit 72e7a82c88

View File

@ -589,6 +589,10 @@ fwup_apply_capsules(EFI_CAPSULE_HEADER **capsules,
rc = uefi_call_wrapper(RT->QueryCapsuleCapabilities, 4, capsules,
num_updates, &max_capsule_size, reset);
if (EFI_ERROR(rc)) {
fwup_warning(L"Could not query capsule capabilities: %r", rc);
return rc;
}
fwup_debug(L"QueryCapsuleCapabilities: %r max: %ld reset:%d",
rc, max_capsule_size, *reset);
fwup_debug(L"Capsules: %d", num_updates);