From: kbuild test robot Date: Sun, 30 Nov 2014 21:42:52 +0000 (+1100) Subject: xfs: fix simple_return.cocci warning in xfs_bmse_shift_one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d254aaec5d1aa2997dad035db340c298eaa8d089;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git xfs: fix simple_return.cocci warning in xfs_bmse_shift_one 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 Signed-off-by: Fengguang Wu --- diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 79c981984dca..20d2e96aef6a 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -5592,12 +5592,8 @@ shift_extent: 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;