lkml.org 
[lkml]   [2017]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: kernel/module: Delete an error message for a failed memory allocation in add_module_usage()
    +++ SF Markus Elfring [06/10/17 17:12 +0200]:
    >From: Markus Elfring <elfring@users.sourceforge.net>
    >Date: Fri, 6 Oct 2017 16:27:26 +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>

    Applied to modules-next, thanks.

    Jessica

    >---
    > kernel/module.c | 4 +---
    > 1 file changed, 1 insertion(+), 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;
    >--
    >2.14.2
    >

    \
     
     \ /
      Last update: 2017-10-22 17:22    [W:2.429 / U:0.212 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site