Skip to content

Commit

Permalink
GFS2: Delete an unnecessary check before the function call "iput"
Browse files Browse the repository at this point in the history
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 <elfring@users.sourceforge.net>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
  • Loading branch information
Markus Elfring authored and Bob Peterson committed Nov 16, 2015
1 parent acc546f commit 6fde224
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo)
fail_ut_i:
iput(sdp->sd_sc_inode);
fail:
if (pn)
iput(pn);
iput(pn);
return error;
}

Expand Down

0 comments on commit 6fde224

Please sign in to comment.