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: <20210920190518.23056-1-tim.gardner@canonical.com>
Date:   Mon, 20 Sep 2021 13:05:18 -0600
From:   Tim Gardner <tim.gardner@...onical.com>
To:     cluster-devel@...hat.com
Cc:     tim.gardner@...onical.com, Bob Peterson <rpeterso@...hat.com>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] gfs2: Fix unused value warning in do_gfs2_set_flags()

Coverity complains of an unused value:

CID 119623 (#1 of 1): Unused value (UNUSED_VALUE)
assigned_value: Assigning value -1 to error here, but that stored value is
overwritten before it can be used.
237        error = -EPERM;

Fix it by removing the assignment.

Cc: Bob Peterson <rpeterso@...hat.com>
Cc: Andreas Gruenbacher <agruenba@...hat.com>
Cc: cluster-devel@...hat.com
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
---
 fs/gfs2/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 354cf85154a6..7e09d2168030 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -234,7 +234,6 @@ static int do_gfs2_set_flags(struct inode *inode, u32 reqflags, u32 mask)
 	if ((new_flags ^ flags) == 0)
 		goto out;
 
-	error = -EPERM;
 	if (!IS_IMMUTABLE(inode)) {
 		error = gfs2_permission(&init_user_ns, inode, MAY_WRITE);
 		if (error)
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ