OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaa6fc6
)
efi/libstub: Simplify efi_get_memory_map()
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 16 Feb 2020 18:40:50 +0000
(19:40 +0100)
committer
Ard Biesheuvel
<ardb@kernel.org>
Sun, 23 Feb 2020 20:57:15 +0000
(21:57 +0100)
Do not check the value of status twice.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Link:
https://lore.kernel.org/r/20200216184050.3100-1-xypron.glpk@gmx.de
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/mem.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/efi/libstub/mem.c
b/drivers/firmware/efi/libstub/mem.c
index
1706008
..
2499e04
100644
(file)
--- a/
drivers/firmware/efi/libstub/mem.c
+++ b/
drivers/firmware/efi/libstub/mem.c
@@
-52,13
+52,14
@@
again:
goto again;
}
- if (status != EFI_SUCCESS)
+ if (status == EFI_SUCCESS) {
+ if (map->key_ptr)
+ *map->key_ptr = key;
+ if (map->desc_ver)
+ *map->desc_ver = desc_version;
+ } else {
efi_bs_call(free_pool, m);
-
- if (map->key_ptr && status == EFI_SUCCESS)
- *map->key_ptr = key;
- if (map->desc_ver && status == EFI_SUCCESS)
- *map->desc_ver = desc_version;
+ }
fail:
*map->map = m;