ntfs: fix uninitialized symbol warnings
Subsystems (2)
Hyunchul Lee
maintainerPATCH 1/1 ntfs: fix uninitialized symbol warnings
Detected by Smatch:
fs/ntfs/ea.c:444
ntfs_ea_set_wsl_inode() error: uninitialized symbol 'err'.fs/ntfs/namei.c:651
__ntfs_create() error: uninitialized symbol 'ea_size.fs/ntfs/iomap.c:517
ntfs_write_simple_iomap_begin_non_resident()
error: uninitialized symbol 'err'.
Signed-off-by Hyunchul Lee <[email protected]>
--- fs/ntfs/ea.c | 5 ++++- fs/ntfs/iomap.c | 2 +- fs/ntfs/namei.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-)
fs/ntfs/ea.c +4 -1
@@ -406,7 +406,10 @@ int ntfs_ea_set_wsl_inode(struct inode *inode, dev_t rdev, __le16 *ea_size, unsigned int flags) {__le32 v; -int err; +int err =0 ; + +if (ea_size) + *ea_size =0 ;if (flags &NTFS_EA_UID ) {/* Store uid to lxuid EA */
fs/ntfs/iomap.c +1 -1
@@ -384,7 +384,7 @@ static int ntfs_write_simple_iomap_begin_non_resident(struct inode *inode, loff_loff_t vcn_ofs, rl_length;struct runlist_element *rl, *rlc;bool is_retry = false; -int err; +int err =0 ;s64 vcn, lcn;s64 max_clu_count =ntfs_bytes_to_cluster (vol,round_up (length, vol->cluster_size));
fs/ntfs/namei.c +1 -1
@@ -408,7 +408,7 @@ static struct ntfs_inode *__ntfs_create(struct mnt_idmap *idmap, struct inode *dstruct super_block *sb = dir_ni->vol->sb;__le64 parent_mft_ref;u64 child_mft_ref; -__le16 ea_size; +__le16 ea_size =0 ; vi =new_inode (vol->sb);if (!vi)
Signature · 1 line
2.43.0