Skip to content

Commit b821281

Browse files
Dan Carpenterkdave
authored andcommitted
btrfs: directly return 0 on no error code in btrfs_insert_raid_extent()
It's more obvious to return a literal zero instead of "return ret;". Plus Smatch complains that ret could be uninitialized if the ordered_extent->bioc_list list is empty and this silences that warning. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent dec96fc commit b821281

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/raid-stripe-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans,
145145
btrfs_put_bioc(bioc);
146146
}
147147

148-
return ret;
148+
return 0;
149149
}
150150

151151
int btrfs_get_raid_extent_offset(struct btrfs_fs_info *fs_info,

0 commit comments

Comments
 (0)