Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ad04574 authored by Markus Elfring's avatar Markus Elfring Committed by Jessica Yu
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
parent 33d930e5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;