Skip to content

Commit

Permalink
fuse: remove the unneeded result variable
Browse files Browse the repository at this point in the history
Return the value fuse_dev_release() 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>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
ye xingchen authored and Miklos Szeredi committed Nov 23, 2022
1 parent 00d369b commit e2283a7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/fuse/cuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
{
struct fuse_dev *fud = file->private_data;
struct cuse_conn *cc = fc_to_cc(fud->fc);
int rc;

/* remove from the conntbl, no more access from this point on */
mutex_lock(&cuse_lock);
Expand All @@ -560,9 +559,7 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
cdev_del(cc->cdev);
}

rc = fuse_dev_release(inode, file); /* puts the base reference */

return rc;
return fuse_dev_release(inode, file);
}

static struct file_operations cuse_channel_fops; /* initialized during init */
Expand Down

0 comments on commit e2283a7

Please sign in to comment.