diff options
author | Andrey Vatoropin <a.vatoropin@crpt.ru> | 2025-03-03 12:13:56 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2025-04-28 12:17:08 +0300 |
commit | 4665a0da497b1bd42569e5bc6da4cd9ce82f9c25 (patch) | |
tree | 85a405cf6ebfc46a83095611c8b92f6a374d5718 | |
parent | 0af2f6be1b4281385b618cb86ad946eded089ac8 (diff) | |
download | linux-4665a0da497b1bd42569e5bc6da4cd9ce82f9c25.tar.xz |
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>
-rw-r--r-- | fs/ntfs3/fslog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c index d0d530f4e2b9..e69f623b2e49 100644 --- a/fs/ntfs3/fslog.c +++ b/fs/ntfs3/fslog.c @@ -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; |