Skip to content

Commit

Permalink
xfs: fix simple_return.cocci warning in xfs_bmse_shift_one
Browse files Browse the repository at this point in the history
fs/xfs/libxfs/xfs_bmap.c:5591:1-6: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Brian Foster <bfoster@redhat.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
  • Loading branch information
kbuild test robot authored and Dave Chinner committed Nov 30, 2014
1 parent 8300475 commit d254aae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/xfs/libxfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -5592,12 +5592,8 @@ xfs_bmse_shift_one(
XFS_WANT_CORRUPTED_GOTO(i == 1, out_error);

got.br_startoff = startoff;
error = xfs_bmbt_update(cur, got.br_startoff, got.br_startblock,
return xfs_bmbt_update(cur, got.br_startoff, got.br_startblock,
got.br_blockcount, got.br_state);
if (error)
return error;

return 0;

out_error:
return error;
Expand Down

0 comments on commit d254aae

Please sign in to comment.