efi: fix an error code
Subsystems (2)
PATCH 1/1 efi: fix an error code
We should return -ENOMEM here, instead of success.
Fixes 475fb4e8b2f4 ('efi / ACPI: load SSTDs from EFI variables')
Signed-off-by Dan Carpenter <[email protected]>
drivers/firmware/efi/efi.c +3 -1
@@ -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) {
Ard Biesheuvel
AppliedQuoted 22 lines · Dan Carpenter
We should return
-ENOMEMhere, instead of success.Fixes 475fb4e8b2f4 ('efi / ACPI: load SSTDs from EFI variables')Signed-off-by Dan Carpenter <[email protected]>drivers/firmware/efi/efi.c +3
-2@@ -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) { --
Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Applied, thanks.