btrfs: fix warning on uninit variable in btrfs_finish_chunk_alloc
authorChris Mason <clm@fb.com>
Wed, 23 Dec 2015 21:30:51 +0000 (13:30 -0800)
committerChris Mason <clm@fb.com>
Wed, 23 Dec 2015 21:30:51 +0000 (13:30 -0800)
map->num_stripes really can't be zero, but just in case.

Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/volumes.c

index a37cc0478bb21534d930f44feb926fd89f2a67cc..a114b7bb87a0290bc20d184ebed5f757d6ec1ee0 100644 (file)
@@ -4794,7 +4794,7 @@ int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
        u64 dev_offset;
        u64 stripe_size;
        int i = 0;
-       int ret;
+       int ret = 0;
 
        em_tree = &extent_root->fs_info->mapping_tree.map_tree;
        read_lock(&em_tree->lock);