Skip to content

Commit

Permalink
efi: Fix comment for efi_mem_type() wrt absent physical addresses
Browse files Browse the repository at this point in the history
A previous commit f99afd0 ("efi: Update efi_mem_type() to return an
error rather than 0") changed the return value from EFI_RESERVED_TYPE to
-EINVAL when the searched physical address is not present in any memory
descriptor. But the comment preceding the function never changed. Let's
change the comment now to reflect the new return value -EINVAL.

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200113172245.27925-10-ardb@kernel.org
  • Loading branch information
Anshuman Khandual authored and Ingo Molnar committed Jan 20, 2020
1 parent 64c8a0c commit 62b605b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
*
* Search in the EFI memory map for the region covering @phys_addr.
* Returns the EFI memory type if the region was found in the memory
* map, EFI_RESERVED_TYPE (zero) otherwise.
* map, -EINVAL otherwise.
*/
int efi_mem_type(unsigned long phys_addr)
{
Expand Down

0 comments on commit 62b605b

Please sign in to comment.