mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
ntfs: fix uninitialized variable in ntfs_write_simple_iomap_begin_non_resident
Smatch reported that err could be used uninitialized if the code path does not enter the first ntfs_zero_range() block. Reported-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
cf29a21b3d
commit
8a59a2d84f
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user