diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-10-06 16:27:26 +0200 |
---|---|---|
committer | Jessica Yu <jeyu@kernel.org> | 2017-10-19 13:06:13 +0200 |
commit | 9ad0457423af877ad1b76c105a57130da028ccad (patch) | |
tree | 74060e927c43c1fc86ad447ead6de766b1f21776 /kernel | |
parent | 33d930e59a98fa10a0db9f56c7fa2f21a4aef9b9 (diff) | |
download | linux-stable-9ad0457423af877ad1b76c105a57130da028ccad.tar.gz linux-stable-9ad0457423af877ad1b76c105a57130da028ccad.tar.bz2 linux-stable-9ad0457423af877ad1b76c105a57130da028ccad.zip |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 4 |
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) pr_debug("Allocating new usage for %s.\n", a->name); use = kmalloc(sizeof(*use), GFP_ATOMIC); - if (!use) { - pr_warn("%s: out of memory loading\n", a->name); + if (!use) return -ENOMEM; - } use->source = a; use->target = b; |