lkml.org 
[lkml]   [2017]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 1/4] btrfs: Delete an error message for a failed memory allocation in btrfsic_process_superblock()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Sun, 20 Aug 2017 21:10:17 +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>
    ---
    fs/btrfs/check-integrity.c | 4 +---
    1 file changed, 1 insertion(+), 3 deletions(-)

    diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
    index 7d65d98d2790..9701a38860d6 100644
    --- a/fs/btrfs/check-integrity.c
    +++ b/fs/btrfs/check-integrity.c
    @@ -656,10 +656,8 @@ static int btrfsic_process_superblock(struct btrfsic_state *state,

    BUG_ON(NULL == state);
    selected_super = kzalloc(sizeof(*selected_super), GFP_NOFS);
    - if (NULL == selected_super) {
    - pr_info("btrfsic: error, kmalloc failed!\n");
    + if (!selected_super)
    return -ENOMEM;
    - }

    list_for_each_entry(device, dev_head, dev_list) {
    int i;
    --
    2.14.0
    \
     
     \ /
      Last update: 2017-08-20 22:21    [W:3.992 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site