提交 9ad04574 编写于 作者: M Markus Elfring 提交者: Jessica Yu

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NJessica Yu <jeyu@kernel.org>
上级 33d930e5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册