Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87cfa004 authored by Jan Kara's avatar Jan Kara Committed by Mark Fasheh
Browse files

ocfs2: Fix checking of return value of new_inode()



new_inode() does not return ERR_PTR() but NULL in case of failure. Correct
checking of the return value.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent fa38e92c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -378,8 +378,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
	}

	inode = new_inode(dir->i_sb);
	if (IS_ERR(inode)) {
		status = PTR_ERR(inode);
	if (!inode) {
		status = -ENOMEM;
		mlog(ML_ERROR, "new_inode failed!\n");
		goto leave;
	}