summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/memattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/memattr.c')
-rw-r--r--drivers/firmware/efi/memattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
index 236004b9a50d..9faa09e7c31f 100644
--- a/drivers/firmware/efi/memattr.c
+++ b/drivers/firmware/efi/memattr.c
@@ -93,7 +93,7 @@ static bool entry_is_valid(const efi_memory_desc_t *in, efi_memory_desc_t *out)
if (!(md->attribute & EFI_MEMORY_RUNTIME))
continue;
- if (md->virt_addr == 0) {
+ if (md->virt_addr == 0 && md->phys_addr != 0) {
/* no virtual mapping has been installed by the stub */
break;
}