diff options
author | Dan Carpenter <[email protected]> | 2016-10-18 15:33:18 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2016-10-18 17:11:20 +0200 |
commit | a75dcb5848359f488c32c0aef8711d9bd37a77b8 (patch) | |
tree | f2a640b7d9ab236612e19ab90ec481c5e1723dfc | |
parent | 753375a881caa01112b7cec2c796749154e0bb23 (diff) |
efi/efivar_ssdt_load: Don't return success on allocation failure
We should return -ENOMEM here, instead of success.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | drivers/firmware/efi/efi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 1ac199cd75e7..a4944e22f294 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -259,8 +259,10 @@ static __init int efivar_ssdt_load(void) } data = kmalloc(size, GFP_KERNEL); - if (!data) + if (!data) { + ret = -ENOMEM; goto free_entry; + } ret = efivar_entry_get(entry, NULL, &size, data); if (ret) { |