* [PATCH] efi: Delete an error message for a failed memory allocation in efivar_init()
@ 2018-02-13 16:33 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-02-13 16:33 UTC (permalink / raw)
To: linux-efi, Ard Biesheuvel; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 13 Feb 2018 17:28:22 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/firmware/efi/vars.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c
index 9336ffdf6e2c..ffdbc5bc3c56 100644
--- a/drivers/firmware/efi/vars.c
+++ b/drivers/firmware/efi/vars.c
@@ -437,10 +437,8 @@ int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *),
int err = 0;
variable_name = kzalloc(variable_name_size, GFP_KERNEL);
- if (!variable_name) {
- printk(KERN_ERR "efivars: Memory allocation failed.\n");
+ if (!variable_name)
return -ENOMEM;
- }
if (down_interruptible(&efivars_lock)) {
err = -EINTR;
--
2.16.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-13 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 16:33 [PATCH] efi: Delete an error message for a failed memory allocation in efivar_init() SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®