Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -1
+1 -1
fs/ntfs/iomap.c
··· 384 384 loff_t vcn_ofs, rl_length; 385 385 struct runlist_element *rl, *rlc; 386 386 bool is_retry = false; 387 - int err; 387 + int err = 0; 388 388 s64 vcn, lcn; 389 389 s64 max_clu_count = 390 390 ntfs_bytes_to_cluster(vol, round_up(length, vol->cluster_size));