]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/firmware/efi/memattr.c
efi: Replace GPL license boilerplate with SPDX headers
[linux.git] / drivers / firmware / efi / memattr.c
index 8986757eafafa29dbf287b9e45b4de592cbc9570..58452fde92cc0ebe837e602cc89691458aa2524f 100644 (file)
@@ -1,9 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2016 Linaro Ltd. <ard.biesheuvel@linaro.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
  */
 
 #define pr_fmt(fmt)    "efi: memattr: " fmt
@@ -94,7 +91,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;
                }