From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Sun, 20 Aug 2017 20:17:37 +0000 Subject: [PATCH 1/4] btrfs: Delete an error message for a failed memory allocation in btrfsic_process_superbl Message-Id: List-Id: References: <360126ba-e45b-0a8d-57b6-83764c4c2bce@users.sourceforge.net> In-Reply-To: <360126ba-e45b-0a8d-57b6-83764c4c2bce@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-btrfs@vger.kernel.org, Chris Mason , David Sterba , Josef Bacik Cc: LKML , kernel-janitors@vger.kernel.org From: Markus Elfring 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 --- 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