Commit 7cf4b3c7 authored by Hyunchul Lee's avatar Hyunchul Lee Committed by Namjae Jeon
Browse files

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: default avatarHyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
parent e6a95c5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -593,7 +593,7 @@ u64 ntfs_lookup_inode_by_name(struct ntfs_inode *dir_ni, const __le16 *uname,
		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
Original line number Diff line number Diff line
@@ -721,7 +721,7 @@ switch_to_data1_zone: search_zone = 2;
		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);