According to the UEFI AllocatePages() has to return EFI_OUT_OF_RESOURCES if
sufficient memory is not available.
Change the return value.
UEFI SCT II (2017): 3.2.1 AllocatePages(), 5.1.2.1.8
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
/* Any page */
addr = efi_find_free_memory(len, -1ULL);
if (!addr) {
- r = EFI_NOT_FOUND;
+ r = EFI_OUT_OF_RESOURCES;
break;
}
break;
/* Max address */
addr = efi_find_free_memory(len, *memory);
if (!addr) {
- r = EFI_NOT_FOUND;
+ r = EFI_OUT_OF_RESOURCES;
break;
}
break;