lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220906053848.2503-1-wangdeming@inspur.com>
Date:   Tue, 6 Sep 2022 01:38:48 -0400
From:   Deming Wang <wangdeming@...pur.com>
To:     <vgoyal@...hat.com>, <stefanha@...hat.com>, <miklos@...redi.hu>
CC:     <virtualization@...ts.linux-foundation.org>,
        <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Deming Wang <wangdeming@...pur.com>
Subject: [PATCH] virtiofs: Drop unnecessary initialization in send_forget_request and virtio_fs_get_tree

The variable is initialized but it is only used after its assignment.

Signed-off-by: Deming Wang <wangdeming@...pur.com>
---
 fs/fuse/virtio_fs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 4d8d4f16c..bffe74d44 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -414,7 +414,7 @@ static int send_forget_request(struct virtio_fs_vq *fsvq,
 {
 	struct scatterlist sg;
 	struct virtqueue *vq;
-	int ret = 0;
+	int ret;
 	bool notify;
 	struct virtio_fs_forget_req *req = &forget->req;
 
@@ -1414,10 +1414,10 @@ static int virtio_fs_get_tree(struct fs_context *fsc)
 {
 	struct virtio_fs *fs;
 	struct super_block *sb;
-	struct fuse_conn *fc = NULL;
+	struct fuse_conn *fc;
 	struct fuse_mount *fm;
 	unsigned int virtqueue_size;
-	int err = -EIO;
+	int err;
 
 	/* This gets a reference on virtio_fs object. This ptr gets installed
 	 * in fc->iq->priv. Once fuse_conn is going away, it calls ->put()
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ