aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2021-09-20 13:05:18 -0600
committerAndreas Gruenbacher <agruenba@redhat.com>2021-10-25 08:42:20 +0200
commite34e6f8133b8c783a44c235b843e9046e55adbf0 (patch)
tree73fb20955c126e5920189fc658db5e0e2e096b14 /fs
parent660a6126f8c3208f6df8d552039cda078a8426d1 (diff)
downloadlinux-e34e6f8133b8c783a44c235b843e9046e55adbf0.tar.gz
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. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/file.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 0f54d870e40233..8267ab9b57decd 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)