mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
btrfs: send: simplify return logic from fs_path_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
147ff86860
commit
c727371879
|
|
@ -560,11 +560,10 @@ static int fs_path_add(struct fs_path *p, const char *name, int name_len)
|
|||
|
||||
ret = fs_path_prepare_for_add(p, name_len, &prepared);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
memcpy(prepared, name, name_len);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fs_path_add_path(struct fs_path *p, struct fs_path *p2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user