libxfs: fix simple_return.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Sun, 30 Nov 2014 21:24:58 +0000 (08:24 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 30 Nov 2014 21:24:58 +0000 (08:24 +1100)
fs/xfs/libxfs/xfs_ialloc.c:1141: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

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_ialloc.c

index 23dcb72fc5e688f7d550f4cd79b7f4fbac8ec7b3..705a7530176efc11854612a5d27eaeb2de0cb23d 100644 (file)
@@ -1137,11 +1137,7 @@ xfs_dialloc_ag_update_inobt(
        XFS_WANT_CORRUPTED_RETURN((rec.ir_free == frec->ir_free) &&
                                  (rec.ir_freecount == frec->ir_freecount));
 
-       error = xfs_inobt_update(cur, &rec);
-       if (error)
-               return error;
-
-       return 0;
+       return xfs_inobt_update(cur, &rec);
 }
 
 /*