aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-10-06 10:27:26 -0400
committerJessica Yu <jeyu@kernel.org>2017-10-19 07:06:13 -0400
commit9ad0457423af877ad1b76c105a57130da028ccad (patch)
tree74060e927c43c1fc86ad447ead6de766b1f21776
parent33d930e59a98fa10a0db9f56c7fa2f21a4aef9b9 (diff)
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>
-rw-r--r--kernel/module.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c
index de66ec825992..07ef44767245 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -837,10 +837,8 @@ static int add_module_usage(struct module *a, struct module *b)
837 837
838 pr_debug("Allocating new usage for %s.\n", a->name); 838 pr_debug("Allocating new usage for %s.\n", a->name);
839 use = kmalloc(sizeof(*use), GFP_ATOMIC); 839 use = kmalloc(sizeof(*use), GFP_ATOMIC);
840 if (!use) { 840 if (!use)
841 pr_warn("%s: out of memory loading\n", a->name);
842 return -ENOMEM; 841 return -ENOMEM;
843 }
844 842
845 use->source = a; 843 use->source = a;
846 use->target = b; 844 use->target = b;