diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:20:26 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:20:26 -0700 |
| commit | f797d37ead9afc9b5586f02789819a8fb72a55fc (patch) | |
| tree | 8278cc2cdb32d5aabfab919e79afe56774618b8d /arch/x86/platform/efi/efi.c | |
| parent | 41341261aa1707b49f937ba2c20d1a0daa5afac3 (diff) | |
| parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) | |
Merge 3.10-rc7 into usb-next
We want the USB fixes and other good stuff in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/platform/efi/efi.c')
| -rw-r--r-- | arch/x86/platform/efi/efi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 5ae2eb09419e..d2fbcedcf6ea 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -1069,7 +1069,10 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) * that by attempting to use more space than is available. */ unsigned long dummy_size = remaining_size + 1024; - void *dummy = kmalloc(dummy_size, GFP_ATOMIC); + void *dummy = kzalloc(dummy_size, GFP_ATOMIC); + + if (!dummy) + return EFI_OUT_OF_RESOURCES; status = efi.set_variable(efi_dummy_name, &EFI_DUMMY_GUID, EFI_VARIABLE_NON_VOLATILE | @@ -1089,6 +1092,8 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) 0, dummy); } + kfree(dummy); + /* * The runtime code may now have triggered a garbage collection * run, so check the variable info again |
