Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Hyunchul Lee and committed by
Namjae Jeon
7cf4b3c7 e6a95c5a

+2 -2
+1 -1
fs/ntfs/dir.c
··· 593 593 unmap_mft_record(dir_ni); 594 594 kfree(name); 595 595 *res = NULL; 596 - if (ia_vi && !IS_ERR(ia_vi)) 596 + if (!IS_ERR_OR_NULL(ia_vi)) 597 597 iput(ia_vi); 598 598 return ERR_MREF(err); 599 599 dir_err_out:
+1 -1
fs/ntfs/lcnalloc.c
··· 721 721 rl[rlpos].lcn = is_extension ? LCN_ENOENT : LCN_RL_NOT_MAPPED; 722 722 rl[rlpos].length = 0; 723 723 } 724 - if (likely(folio && !IS_ERR(folio))) { 724 + if (!IS_ERR_OR_NULL(folio)) { 725 725 if (need_writeback) { 726 726 ntfs_debug("Marking page dirty."); 727 727 folio_mark_dirty(folio);