mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
btrfs: simplify gotos in open_seed_device
The function does not have a common exit block and returns immediatelly so there's no point having the goto. Remove the two cases. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e493e8f9bc
commit
c83b60c0e4
1 changed files with 3 additions and 5 deletions
|
@ -6753,19 +6753,17 @@ static struct btrfs_fs_devices *open_seed_devices(struct btrfs_fs_info *fs_info,
|
|||
ret = open_fs_devices(fs_devices, FMODE_READ, fs_info->bdev_holder);
|
||||
if (ret) {
|
||||
free_fs_devices(fs_devices);
|
||||
fs_devices = ERR_PTR(ret);
|
||||
goto out;
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
if (!fs_devices->seeding) {
|
||||
close_fs_devices(fs_devices);
|
||||
free_fs_devices(fs_devices);
|
||||
fs_devices = ERR_PTR(-EINVAL);
|
||||
goto out;
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
list_add(&fs_devices->seed_list, &fs_info->fs_devices->seed_list);
|
||||
out:
|
||||
|
||||
return fs_devices;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue