diff mbox series

fs: smb: server: Replace unneed variable ret with 0

Message ID 20230626123112.3624-1-youkangren@vivo.com (mailing list archive)
State New, archived
Headers show
Series fs: smb: server: Replace unneed variable ret with 0 | expand

Commit Message

You Kangren June 26, 2023, 12:31 p.m. UTC
Replace unneed variable ret with 0 to make the code clean

Signed-off-by: You Kangren <youkangren@vivo.com>
---
 fs/smb/server/vfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Namjae Jeon June 26, 2023, 12:49 p.m. UTC | #1
2023-06-26 21:31 GMT+09:00, You Kangren <youkangren@vivo.com>:
> Replace unneed variable ret with 0 to make the code clean
>
> Signed-off-by: You Kangren <youkangren@vivo.com>
This has already been fixed by another developer.
Please see:
https://git.samba.org/?p=ksmbd.git;a=commit;h=ccb5889af97c03c67a83fcd649602034578c0d61

Thanks.
diff mbox series

Patch

diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index 81489fdedd8e..ddf60f439617 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -124,8 +124,6 @@  static int ksmbd_vfs_path_lookup_locked(struct ksmbd_share_config *share_conf,
 int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap,
 				   struct dentry *dentry, __le32 *daccess)
 {
-	int ret = 0;
-
 	*daccess = cpu_to_le32(FILE_READ_ATTRIBUTES | READ_CONTROL);
 
 	if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_WRITE))
@@ -143,7 +141,7 @@  int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap,
 	if (!inode_permission(idmap, d_inode(dentry->d_parent), MAY_EXEC | MAY_WRITE))
 		*daccess |= FILE_DELETE_LE;
 
-	return ret;
+	return 0;
 }
 
 /**