diff --git a/fs/namei.c b/fs/namei.c
index c75ea03ca147ec..00384488fda1f7 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3458,7 +3458,7 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
 		goto out;
 	child = vfs_tmpfile(path.dentry, op->mode, op->open_flag);
 	error = PTR_ERR(child);
-	if (unlikely(IS_ERR(child)))
+	if (IS_ERR(child))
 		goto out2;
 	dput(path.dentry);
 	path.dentry = child;