Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1168580AbcKAK0n (ORCPT ); Tue, 1 Nov 2016 06:26:43 -0400 Received: from smtp04.smtpout.orange.fr ([80.12.242.126]:17000 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1168561AbcKAK0j (ORCPT ); Tue, 1 Nov 2016 06:26:39 -0400 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2016 11:26:37 +0100 X-ME-IP: 92.140.167.9 From: Christophe JAILLET To: clm@fb.com, jbacik@fb.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] btrfs: Remove some dead code Date: Tue, 1 Nov 2016 11:26:06 +0100 Message-Id: <20161101102606.27006-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.9.3 X-Antivirus: avast! (VPS 161031-1, 31/10/2016), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 23 'btrfs_iget()' can not return an error pointer, so this test can be removed. Signed-off-by: Christophe JAILLET --- fs/btrfs/free-space-cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index e4b48f377d3a..afd8b0c10acd 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -75,8 +75,6 @@ static struct inode *__lookup_free_space_inode(struct btrfs_root *root, btrfs_release_path(path); inode = btrfs_iget(root->fs_info->sb, &location, root, NULL); - if (!inode) - return ERR_PTR(-ENOENT); if (IS_ERR(inode)) return inode; if (is_bad_inode(inode)) { -- 2.9.3