@@ -1165,11 +1165,7 @@ int btrfs_create_free_space_tree(struct
btrfs_set_fs_compat_ro(fs_info, FREE_SPACE_TREE);
- ret = btrfs_commit_transaction(trans, tree_root);
- if (ret)
- return ret;
-
- return 0;
+ return btrfs_commit_transaction(trans, tree_root);
abort:
btrfs_abort_transaction(trans, tree_root, ret);
@@ -1252,11 +1248,7 @@ int btrfs_clear_free_space_tree(struct b
free_extent_buffer(free_space_root->commit_root);
kfree(free_space_root);
- ret = btrfs_commit_transaction(trans, tree_root);
- if (ret)
- return ret;
-
- return 0;
+ return btrfs_commit_transaction(trans, tree_root);
abort:
btrfs_abort_transaction(trans, tree_root, ret);
fs/btrfs/free-space-tree.c:1255:1-4: WARNING: end returns can be simpified fs/btrfs/free-space-tree.c:1168:1-4: 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: Omar Sandoval <osandov@fb.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- free-space-tree.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html