Skip to content

Commit 819bd27

Browse files
fs/ntfs3: fix Smatch warnings
Initialize err in ni_allocate_da_blocks_locked() and correct the pre_alloc condition in attr_allocate_clusters(). Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 0ca0485 commit 819bd27

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

fs/ntfs3/attrib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int attr_allocate_clusters(struct ntfs_sb_info *sbi, struct runs_tree *run,
173173

174174
if (err == -ENOSPC && pre) {
175175
pre = 0;
176-
if (*pre_alloc)
176+
if (pre_alloc)
177177
*pre_alloc = 0;
178178
continue;
179179
}

fs/ntfs3/frecord.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3267,7 +3267,7 @@ int ni_allocate_da_blocks(struct ntfs_inode *ni)
32673267
*/
32683268
int ni_allocate_da_blocks_locked(struct ntfs_inode *ni)
32693269
{
3270-
int err;
3270+
int err = 0;
32713271

32723272
if (!ni->file.run_da.count)
32733273
return 0;

0 commit comments

Comments
 (0)