From: Bob Peterson Date: Tue, 12 Jan 2016 12:54:52 -0500 Subject: [Cluster-devel] [PATCH 02/19] GFS2: Delete an unnecessary check before the function call "iput" In-Reply-To: <1452621309-25857-1-git-send-email-rpeterso@redhat.com> References: <1452621309-25857-1-git-send-email-rpeterso@redhat.com> Message-ID: <1452621309-25857-3-git-send-email-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Markus Elfring The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bob Peterson --- fs/gfs2/ops_fstype.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index baab99b..1f9de17 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -910,8 +910,7 @@ fail_qc_i: fail_ut_i: iput(sdp->sd_sc_inode); fail: - if (pn) - iput(pn); + iput(pn); return error; } -- 2.5.0