efi: Allow efi_free() to be called with size of 0
authorRoy Franz <roy.franz@linaro.org>
Sun, 22 Sep 2013 22:45:38 +0000 (15:45 -0700)
committerMark Brown <broonie@linaro.org>
Mon, 16 Jun 2014 20:18:00 +0000 (21:18 +0100)
commit1e4247bf980786f472f3a693be2b72da94661c7e
tree4ad379c4faced55c64bf93be13bd1634d4edd409
parent3cce6edd3ad71be57581f02cbc6538cf2d809584
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>
(cherry picked from commit 0e1cadb05bba2293b4575c8cab275313d181d94f)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/x86/boot/compressed/eboot.c
drivers/firmware/efi/efi-stub-helper.c