From ba33ac100d3feb1efb43b32e63cc0c6430936aa3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 31 Oct 2025 01:13:32 -0400 Subject: [PATCH] ksmbd_vfs_rename(): vfs_path_parent_lookup() accepts ERR_PTR() as name no need to check in the caller Signed-off-by: Al Viro --- fs/smb/server/vfs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c index a972261168407..30b65b667b96e 100644 --- a/fs/smb/server/vfs.c +++ b/fs/smb/server/vfs.c @@ -674,10 +674,6 @@ int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path, return -ENOMEM; to = getname_kernel(newname); - if (IS_ERR(to)) { - err = PTR_ERR(to); - goto revert_fsids; - } retry: err = vfs_path_parent_lookup(to, lookup_flags | LOOKUP_BENEATH, @@ -737,7 +733,6 @@ out2: } out1: putname(to); -revert_fsids: ksmbd_revert_fsids(work); return err; } -- 2.47.3