]> git.itanic.dy.fi Git - linux-stable/commitdiff
btrfs: directly return 0 on no error code in btrfs_insert_raid_extent()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 12 Oct 2023 09:42:55 +0000 (12:42 +0300)
committerDavid Sterba <dsterba@suse.com>
Fri, 3 Nov 2023 15:38:51 +0000 (16:38 +0100)
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>
fs/btrfs/raid-stripe-tree.c

index 944e8f1862aaaa69aec78c0de74ad6e9b1f42de6..9589362acfbf9e2ec3c99fdc4b1fb056bf3ddbc7 100644 (file)
@@ -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,