Skip to content

Commit 69c6267

Browse files
hclee1Naim
authored andcommitted
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>
1 parent 81246cc commit 69c6267

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

fs/ntfs/inode.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ static int load_attribute_list_mount(struct ntfs_volume *vol,
17611761
/* The attribute list cannot be sparse. */
17621762
if (lcn < 0) {
17631763
ntfs_error(sb, "ntfs_rl_vcn_to_lcn() failed. Cannot read attribute list.");
1764-
goto err_out;
1764+
return -EIO;
17651765
}
17661766

17671767
rl_byte_off = ntfs_cluster_to_bytes(vol, lcn);
@@ -1774,7 +1774,7 @@ static int load_attribute_list_mount(struct ntfs_volume *vol,
17741774
round_up(rl_byte_len, SECTOR_SIZE));
17751775
if (err) {
17761776
ntfs_error(sb, "Cannot read attribute list.");
1777-
goto err_out;
1777+
return -EIO;
17781778
}
17791779

17801780
if (al + rl_byte_len >= al_end) {
@@ -1792,11 +1792,6 @@ static int load_attribute_list_mount(struct ntfs_volume *vol,
17921792
}
17931793
done:
17941794
return err;
1795-
/* Real overflow! */
1796-
ntfs_error(sb, "Attribute list buffer overflow. Read attribute list is truncated.");
1797-
err_out:
1798-
err = -EIO;
1799-
goto done;
18001795
}
18011796

18021797
/*

0 commit comments

Comments
 (0)