ntfs: prefer IS_ERR_OR_NULL() over manual NULL check

Use IS_ERR_OR_NULL() instead of manual NULL and IS_ERR() checks.

Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
Hyunchul Lee
2026-03-11 11:13:51 +09:00
committed by Namjae Jeon
parent e6a95c5a80
commit 7cf4b3c768
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -593,7 +593,7 @@ err_out:
unmap_mft_record(dir_ni);
kfree(name);
*res = NULL;
if (ia_vi && !IS_ERR(ia_vi))
if (!IS_ERR_OR_NULL(ia_vi))
iput(ia_vi);
return ERR_MREF(err);
dir_err_out:
+1 -1
View File
@@ -721,7 +721,7 @@ out:
rl[rlpos].lcn = is_extension ? LCN_ENOENT : LCN_RL_NOT_MAPPED;
rl[rlpos].length = 0;
}
if (likely(folio && !IS_ERR(folio))) {
if (!IS_ERR_OR_NULL(folio)) {
if (need_writeback) {
ntfs_debug("Marking page dirty.");
folio_mark_dirty(folio);