mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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 <error27@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
0ca0485e4b
commit
819bd270ab
|
|
@ -173,7 +173,7 @@ int attr_allocate_clusters(struct ntfs_sb_info *sbi, struct runs_tree *run,
|
|||
|
||||
if (err == -ENOSPC && pre) {
|
||||
pre = 0;
|
||||
if (*pre_alloc)
|
||||
if (pre_alloc)
|
||||
*pre_alloc = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3267,7 +3267,7 @@ int ni_allocate_da_blocks(struct ntfs_inode *ni)
|
|||
*/
|
||||
int ni_allocate_da_blocks_locked(struct ntfs_inode *ni)
|
||||
{
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
if (!ni->file.run_da.count)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user