mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 09:09:47 +02:00
btrfs: send: simplify return logic from fs_path_prepare_for_add()
There is no need to have an 'out' label and jump into it since there are no resource cleanups to perform (release locks, free memory, etc), so make this simpler by removing the label and goto and instead return directly. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1f63d4b610
commit
147ff86860
1 changed files with 2 additions and 3 deletions
|
|
@ -535,7 +535,7 @@ static int fs_path_prepare_for_add(struct fs_path *p, int name_len,
|
|||
new_len++;
|
||||
ret = fs_path_ensure_buf(p, new_len);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
if (p->reversed) {
|
||||
if (p->start != p->end)
|
||||
|
|
@ -550,8 +550,7 @@ static int fs_path_prepare_for_add(struct fs_path *p, int name_len,
|
|||
*p->end = 0;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fs_path_add(struct fs_path *p, const char *name, int name_len)
|
||||
|
|
|
|||
Loading…
Reference in a new issue