[PATCH linux-next] 9p: Remove the unneeded result variable

cgel.zte@gmail.com posted 1 patch 3 years, 7 months ago
fs/9p/vfs_inode.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[PATCH linux-next] 9p: Remove the unneeded result variable
Posted by cgel.zte@gmail.com 3 years, 7 months ago
From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value v9fs_vfs_mkspecial() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 fs/9p/vfs_inode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 4d1a4a8d9277..d939b32da201 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1370,7 +1370,6 @@ v9fs_vfs_mknod(struct user_namespace *mnt_userns, struct inode *dir,
 	       struct dentry *dentry, umode_t mode, dev_t rdev)
 {
 	struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir);
-	int retval;
 	char name[2 + U32_MAX_DIGITS + 1 + U32_MAX_DIGITS + 1];
 	u32 perm;
 
@@ -1387,9 +1386,8 @@ v9fs_vfs_mknod(struct user_namespace *mnt_userns, struct inode *dir,
 		*name = 0;
 
 	perm = unixmode2p9mode(v9ses, mode);
-	retval = v9fs_vfs_mkspecial(dir, dentry, perm, name);
 
-	return retval;
+	return v9fs_vfs_mkspecial(dir, dentry, perm, name);
 }
 
 int v9fs_refresh_inode(struct p9_fid *fid, struct inode *inode)
-- 
2.25.1