Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kernel/module: Delete an error message for a failed memory allocation in add_module_usage()

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>
Signed-off-by: Jessica Yu <jeyu@kernel.org>

authored by

Markus Elfring and committed by
Jessica Yu
9ad04574 33d930e5

+1 -3
+1 -3
kernel/module.c
··· 837 837 838 838 pr_debug("Allocating new usage for %s.\n", a->name); 839 839 use = kmalloc(sizeof(*use), GFP_ATOMIC); 840 - if (!use) { 841 - pr_warn("%s: out of memory loading\n", a->name); 840 + if (!use) 842 841 return -ENOMEM; 843 - } 844 842 845 843 use->source = a; 846 844 use->target = b;