ksmbd: return a literal instead of 'err' in ksmbd_vfs_kern_path_locked()
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 30 May 2023 12:43:17 +0000 (21:43 +0900)
committerSteve French <stfrench@microsoft.com>
Mon, 26 Jun 2023 05:07:04 +0000 (00:07 -0500)
Return a literal instead of 'err' in ksmbd_vfs_kern_path_locked().

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/vfs.c

index 81489fd..26cb0d5 100644 (file)
@@ -1207,7 +1207,7 @@ int ksmbd_vfs_kern_path_locked(struct ksmbd_work *work, char *name,
 
        err = ksmbd_vfs_path_lookup_locked(share_conf, name, flags, path);
        if (!err)
-               return err;
+               return 0;
 
        if (caseless) {
                char *filepath;