From: Eric Sandeen Date: Sun, 12 Apr 2015 23:33:49 +0000 (+1000) Subject: xfsprogs: remove unreachable code in libxfs_inode_alloc X-Git-Tag: v3.2.3-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89b8d422b3d6a6dfe176aed67e5b3e164af20275;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: remove unreachable code in libxfs_inode_alloc This code does: if (!ialloc_context && !ip) return; // if !ip here, ialloc_context must be true if (ialloc_context) { ... if (!ip) error = ENOSPC; if (error) return error; // if !ip in this block we've returned } // so (!ip) cannot be true here if (!ip) error = ENOSPC; (cherry picked this one out of Coverity reports) Signed-off-by: Eric Sandeen Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/libxfs/util.c b/libxfs/util.c index 6464a1b19..49eb76d4a 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -700,8 +700,6 @@ libxfs_inode_alloc( if (error) return error; } - if (!ip) - error = ENOSPC; *ipp = ip; return error;