mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
ntfs: fix variable dereferenced before check warnings
Detected by Smatch. lcnalloc.c:736 ntfs_cluster_alloc() error: we previously assumed 'rl' could be null (see line 719) inode.c:3275 ntfs_inode_close() warn: variable dereferenced before check 'tmp_nis' (see line 3255) attrib.c:4952 ntfs_attr_remove() warn: variable dereferenced before check 'ni' (see line 4951) dir.c:1035 ntfs_readdir() error: we previously assumed 'private' could be null (see line 850) Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
committed by
Namjae Jeon
parent
7cf4b3c768
commit
4e59f8a1a8
@@ -732,11 +732,13 @@ out:
|
||||
folio_put(folio);
|
||||
}
|
||||
if (likely(!err)) {
|
||||
if (!rl) {
|
||||
err = -EIO;
|
||||
goto out_restore;
|
||||
}
|
||||
if (is_dealloc == true)
|
||||
ntfs_release_dirty_clusters(vol, rl->length);
|
||||
ntfs_debug("Done.");
|
||||
if (rl == NULL)
|
||||
err = -EIO;
|
||||
goto out_restore;
|
||||
}
|
||||
if (err != -ENOSPC)
|
||||
|
||||
Reference in New Issue
Block a user