Skip to content

Commit

Permalink
btrfs: directly return 0 on no error code in btrfs_insert_raid_extent()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and kdave committed Nov 3, 2023
1 parent dec96fc commit b821281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/raid-stripe-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans,
btrfs_put_bioc(bioc);
}

return ret;
return 0;
}

int btrfs_get_raid_extent_offset(struct btrfs_fs_info *fs_info,
Expand Down

0 comments on commit b821281

Please sign in to comment.