linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-btrfs@vger.kernel.org, Chris Mason <clm@fb.com>,
	David Sterba <dsterba@suse.com>, Josef Bacik <jbacik@fb.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/4] btrfs: Delete an error message for a failed memory allocation in btrfsic_process_superblock()
Date: Sun, 20 Aug 2017 22:17:37 +0200	[thread overview]
Message-ID: <f03ea416-7ebb-152b-2e32-d35551d7af26@users.sourceforge.net> (raw)
In-Reply-To: <360126ba-e45b-0a8d-57b6-83764c4c2bce@users.sourceforge.net>

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


  reply	other threads:[~2017-08-20 20:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20 20:16 [PATCH 0/4] BTRFS: Adjustments for several function implementations SF Markus Elfring
2017-08-20 20:17 ` SF Markus Elfring [this message]
2017-08-20 20:18 ` [PATCH 2/4] btrfs: Adjust 32 checks for null pointers SF Markus Elfring
2017-08-21 10:43   ` Timofey Titovets
2017-08-21 13:27     ` SF Markus Elfring
2017-08-21 14:23       ` Timofey Titovets
2017-08-20 20:19 ` [PATCH 3/4] btrfs: Improve eight size determinations SF Markus Elfring
2017-08-21  9:20   ` Timofey Titovets
2017-08-20 20:20 ` [PATCH 4/4] btrfs: Delete an unnecessary variable initialisation in tree_mod_log_eb_copy() SF Markus Elfring
2017-08-21 10:50   ` Timofey Titovets
2017-08-21 13:30     ` SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f03ea416-7ebb-152b-2e32-d35551d7af26@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).