fs/ntfs3: Drop redundant NULL check

Static analysis shows that pointer "mi" cannot be NULL, since it is
pre-initialized above. A potential failure when mi equals NULL is
processed.

Remove the extra NULL check. It is meaningless and harms the readability
of the code, since before that the pointer is unconditionally
dereferenced.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
Andrey Vatoropin 2025-03-03 09:13:56 +00:00 committed by Konstantin Komarov
parent 0af2f6be1b
commit 4665a0da49
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -3143,7 +3143,7 @@ static int do_action(struct ntfs_log *log, struct OPEN_ATTR_ENRTY *oe,
if (inode)
iput(inode);
else if (mi)
else
mi_put(mi);
inode = inode_parent;