From: Markus Elfring <[email protected]>
Date: Thu, 11 May 2017 13:00:34 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: 
http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <[email protected]>
---
 arch/alpha/kernel/module.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index 387d9c500e48..211e62e9a0af 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -109,9 +109,5 @@ module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr 
*sechdrs,
-       if (!chains) {
-               printk(KERN_ERR
-                      "module %s: no memory for symbol chain buffer\n",
-                      me->name);
+       if (!chains)
                return -ENOMEM;
-       }
 
        got->sh_size = 0;
        got->sh_addralign = 8;
-- 
2.12.3

Reply via email to