diff options
| author | Namjae Jeon <linkinjeon@kernel.org> | 2026-04-10 14:29:44 +0300 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-04-18 05:33:05 +0300 |
| commit | 8a59a2d84fa3de2b4bbb8759b52e62c9c06d9d32 (patch) | |
| tree | 2eab33a713bdcbe133b5563670378957d58e18e9 | |
| parent | cf29a21b3d9105c5309e679ba875df1e987cabfa (diff) | |
| download | linux-8a59a2d84fa3de2b4bbb8759b52e62c9c06d9d32.tar.xz | |
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>
| -rw-r--r-- | fs/ntfs/iomap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs/iomap.c b/fs/ntfs/iomap.c index 621645fbbf2e..3d1458dea90f 100644 --- a/fs/ntfs/iomap.c +++ b/fs/ntfs/iomap.c @@ -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)); |
