kernel/module: Delete an error message for a failed memory allocation in add_module_u...
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 6 Oct 2017 14:27:26 +0000 (16:27 +0200)
committerJessica Yu <jeyu@kernel.org>
Thu, 19 Oct 2017 11:06:13 +0000 (13:06 +0200)
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>
kernel/module.c

index de66ec8..07ef447 100644 (file)
@@ -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;