From: Filipe Manana Date: Wed, 5 Feb 2025 12:33:15 +0000 (+0000) Subject: btrfs: send: simplify return logic from fs_path_add_from_extent_buffer() X-Git-Tag: v6.15-rc1~152^2~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78843d7e4e8b2cd85754c121d3f636196c01045d;p=thirdparty%2Flinux.git btrfs: send: simplify return logic from fs_path_add_from_extent_buffer() 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 7a75f1d963f90..b9de1ab94367f 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -580,12 +580,11 @@ static int fs_path_add_from_extent_buffer(struct fs_path *p, ret = fs_path_prepare_for_add(p, len, &prepared); if (ret < 0) - goto out; + return ret; read_extent_buffer(eb, prepared, off, len); -out: - return ret; + return 0; } static int fs_path_copy(struct fs_path *p, struct fs_path *from)