[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a75dcb5848359f488c32c0aef8711d9bd37a77b8@git.kernel.org>
Date: Tue, 18 Oct 2016 08:31:58 -0700
From: tip-bot for Dan Carpenter <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, dan.carpenter@...cle.com,
torvalds@...ux-foundation.org, ard.biesheuvel@...aro.org,
peterz@...radead.org, hpa@...or.com, linux-kernel@...r.kernel.org,
mingo@...nel.org
Subject: [tip:efi/core] efi/efivar_ssdt_load: Don't return success on
allocation failure
Commit-ID: a75dcb5848359f488c32c0aef8711d9bd37a77b8
Gitweb: http://git.kernel.org/tip/a75dcb5848359f488c32c0aef8711d9bd37a77b8
Author: Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Tue, 18 Oct 2016 15:33:18 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 18 Oct 2016 17:11:20 +0200
efi/efivar_ssdt_load: Don't return success on allocation failure
We should return -ENOMEM here, instead of success.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-efi@...r.kernel.org
Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Link: http://lkml.kernel.org/r/20161018143318.15673-9-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
drivers/firmware/efi/efi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1ac199c..a4944e2 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) {
Powered by blists - more mailing lists