Skip to content

Commit 4665a0d

Browse files
Andrey Vatoropinaalexandrovich
authored andcommitted
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 <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 0af2f6b commit 4665a0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ntfs3/fslog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3143,7 +3143,7 @@ static int do_action(struct ntfs_log *log, struct OPEN_ATTR_ENRTY *oe,
31433143

31443144
if (inode)
31453145
iput(inode);
3146-
else if (mi)
3146+
else
31473147
mi_put(mi);
31483148

31493149
inode = inode_parent;

0 commit comments

Comments
 (0)