From: Markus Elfring Date: Fri, 13 Nov 2015 13:55:59 +0000 (-0600) Subject: GFS2: Delete an unnecessary check before the function call "iput" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6fde22426be6af261816db5941744b8d3c4c7f96;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git GFS2: Delete an unnecessary check before the function call "iput" 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 --- diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index baab99b69d8a..1f9de173c4a0 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; }