All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] efi: fix an error code
@ 2016-10-13  8:51 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-10-13  8:51 UTC (permalink / raw)
  To: Matt Fleming, Octavian Purdila
  Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

We should return -ENOMEM here, instead of success.

Fixes: 475fb4e8b2f4 ('efi / ACPI: load SSTDs from EFI variables')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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) {

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-13 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13  8:51 [patch] efi: fix an error code Dan Carpenter
2016-10-13  8:51 ` Dan Carpenter
2016-10-13 10:59 ` Ard Biesheuvel
2016-10-13 10:59   ` Ard Biesheuvel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.