forked from luck/tmp_suning_uos_patched
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@oracle.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Fixes: 475fb4e8b2
("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@kernel.org>
This commit is contained in:
parent
753375a881
commit
a75dcb5848
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user