diff options
author | Roy Franz <roy.franz@linaro.org> | 2013-10-04 12:02:46 -0400 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-10-04 15:07:47 -0400 |
commit | c158c3bf59951bbb44bd7ccca9e6665dfd1617c5 (patch) | |
tree | ee222f5f61f82555dd1422dcdf673dbcd6142bd4 /drivers/firmware | |
parent | 722da9d20e7f203ddbb54aba32f95a020d41fc42 (diff) |
boot, efi: Remove redundant memset()
Remove a redundant memset() call from efi_relocate_kernel() that
was clearing memory that would be used by BSS in non-compressed
images loaded with this function. This clear was redundant with
the clearing done in the image itself, and also implemented incorrectly
with a 0 length.
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efi/efi-stub-helper.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index cc0581daa9ed..b6bffbfd3be7 100644 --- a/drivers/firmware/efi/efi-stub-helper.c +++ b/drivers/firmware/efi/efi-stub-helper.c | |||
@@ -567,8 +567,6 @@ static efi_status_t efi_relocate_kernel(efi_system_table_t *sys_table_arg, | |||
567 | * have been allocated by UEFI, so we can safely use memcpy. | 567 | * have been allocated by UEFI, so we can safely use memcpy. |
568 | */ | 568 | */ |
569 | memcpy((void *)new_addr, (void *)cur_image_addr, image_size); | 569 | memcpy((void *)new_addr, (void *)cur_image_addr, image_size); |
570 | /* Zero any extra space we may have allocated for BSS. */ | ||
571 | memset((void *)(new_addr + image_size), alloc_size - image_size, 0); | ||
572 | 570 | ||
573 | /* Return the new address of the relocated image. */ | 571 | /* Return the new address of the relocated image. */ |
574 | *image_addr = new_addr; | 572 | *image_addr = new_addr; |