summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunchul Lee <hyc.lee@gmail.com>2026-03-13 03:47:01 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-03-16 14:27:52 +0300
commit77f58db7391e227f8ff6ef5d83966347d759daed (patch)
tree0c71c9c7331df7ecc4d159d7756e138a27f9c3b7
parent068a35fd7293c20ba35cc3f19ce981c038cc9328 (diff)
downloadlinux-77f58db7391e227f8ff6ef5d83966347d759daed.tar.xz
ntfs: fix ignoring unreachable code warnings
Detected by Smatch. inode.c:1796 load_attribute_list_mount() warn: ignoring unreachable code. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
-rw-r--r--fs/ntfs/inode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 0c202a03360f..314741a40369 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -1761,7 +1761,7 @@ static int load_attribute_list_mount(struct ntfs_volume *vol,
/* The attribute list cannot be sparse. */
if (lcn < 0) {
ntfs_error(sb, "ntfs_rl_vcn_to_lcn() failed. Cannot read attribute list.");
- goto err_out;
+ return -EIO;
}
rl_byte_off = ntfs_cluster_to_bytes(vol, lcn);
@@ -1774,7 +1774,7 @@ static int load_attribute_list_mount(struct ntfs_volume *vol,
round_up(rl_byte_len, SECTOR_SIZE));
if (err) {
ntfs_error(sb, "Cannot read attribute list.");
- goto err_out;
+ return -EIO;
}
if (al + rl_byte_len >= al_end) {
@@ -1792,11 +1792,6 @@ initialize:
}
done:
return err;
- /* Real overflow! */
- ntfs_error(sb, "Attribute list buffer overflow. Read attribute list is truncated.");
-err_out:
- err = -EIO;
- goto done;
}
/*