diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index a33a4de4aea1..4d5d394f5964 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -1307,8 +1307,7 @@ symlink(p, uap) vput(nd.ni_vp); vput(nd.ni_dvp); ASSERT_VOP_UNLOCKED(nd.ni_dvp, "symlink"); - if (error == 0) - ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink"); + ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink"); out: zfree(namei_zone, path); return (error); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index a33a4de4aea1..4d5d394f5964 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1307,8 +1307,7 @@ symlink(p, uap) vput(nd.ni_vp); vput(nd.ni_dvp); ASSERT_VOP_UNLOCKED(nd.ni_dvp, "symlink"); - if (error == 0) - ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink"); + ASSERT_VOP_UNLOCKED(nd.ni_vp, "symlink"); out: zfree(namei_zone, path); return (error);