summaryrefslogtreecommitdiff
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorRoy Franz <roy.franz@linaro.org>2013-09-22 15:45:38 -0700
committerMatt Fleming <matt.fleming@intel.com>2013-09-25 12:34:42 +0100
commit0e1cadb05bba2293b4575c8cab275313d181d94f (patch)
tree67b3d6a3c48b3fcaad7a5232b84930ca7a678798 /arch/x86/boot
parentae8e9060a3ecfd22bd5059e39f81547613ae376c (diff)
efi: Allow efi_free() to be called with size of 0
Make efi_free() safely callable with size of 0, similar to free() being callable with NULL pointers, and do nothing in that case. Remove size checks that this makes redundant. This also avoids some size checks in the ARM EFI stub code that will be added as well. Signed-off-by: Roy Franz <roy.franz@linaro.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/eboot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index bf2c35d5ec1f..ef2181a96d09 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -506,8 +506,7 @@ struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
return boot_params;
fail2:
- if (options_size)
- efi_free(sys_table, options_size, hdr->cmd_line_ptr);
+ efi_free(sys_table, options_size, hdr->cmd_line_ptr);
fail:
efi_free(sys_table, 0x4000, (unsigned long)boot_params);
return NULL;